Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Jul 31, 2024
1 parent 5626e86 commit 0d4ab5d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/macos-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
depends_on "libarchive"
def install
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug", "-DCMAKE_VERBOSE_MAKEFILE=ON", *std_cmake_args
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_VERBOSE_MAKEFILE=ON"
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
depends_on "libarchive"
def install
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug", "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DCMAKE_C_FLAGS='-fsanitize=undefined -fsanitize=address -fsanitize=leak'", "-DCMAKE_C_COMPILER=#{Formula["llvm"].opt_prefix}/bin/clang", *std_cmake_args
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Debug", "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DCMAKE_C_FLAGS='-fsanitize=undefined -fsanitize=address -fsanitize=leak'", "-DCMAKE_C_COMPILER=#{Formula["llvm"].opt_prefix}/bin/clang"
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand Down
2 changes: 1 addition & 1 deletion src/cleanup.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static int uppm_cleanup_downloads(const bool verbose) {
if (dir_entry == NULL) {
if (errno == 0) {
closedir(dir);
break;
return UPPM_OK;
} else {
perror(downloadDIR);
closedir(dir);
Expand Down
4 changes: 2 additions & 2 deletions src/formula-path.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ static int uppm_formula_repo_scan_callback(UPPMFormulaRepo * formulaRepo, const
if (args->len != NULL) {
(*(args->len)) = ret;
}

return UPPM_OK;
}

return UPPM_OK;
}

int uppm_formula_path(const char * packageName, char buf[], size_t * len) {
Expand Down
2 changes: 2 additions & 0 deletions src/uninstall.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ int uppm_uninstall(const char * packageName, const bool verbose) {
// package is broken. is not installed completely?
return UPPM_ERROR_PACKAGE_NOT_INSTALLED;
}
} else {
return UPPM_ERROR_PACKAGE_NOT_INSTALLED;
}
} else {
return UPPM_ERROR_PACKAGE_NOT_INSTALLED;
Expand Down
2 changes: 1 addition & 1 deletion src/upgrade-self.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int uppm_upgrade_tar_filename(char buf[], const size_t bufSize, const cha
osVersMajor = 14;
}

ret = snprintf(buf, bufSize, "uppm-%s-%s-%s.0-%s.tar.xz", latestVersion, osType, osVersMajor, osArch);
ret = snprintf(buf, bufSize, "uppm-%s-%s-%d.0-%s.tar.xz", latestVersion, osType, osVersMajor, osArch);
#elif defined (__DragonFly__)
ret = snprintf(buf, bufSize, "uppm-%s-%s-%s-%s.tar.xz", latestVersion, osType, osVers, osArch);
#elif defined (__FreeBSD__)
Expand Down

0 comments on commit 0d4ab5d

Please sign in to comment.