forked from nginxinc/nginx-s3-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: error messages for missing dependencies, allow test suite to run…
… on MacOS by supporting `md5` (nginxinc#162) # What Fix error messages for missing dependencies, allow test suite to run on MacOS by supporting `md5` ## Dependency Checks There were some checks like this: ```bash curl_cmd="$(command -v curl)" if ! [ -x "${curl_cmd}" ]; then e "required dependency not found: curl not found in the path or not executable" exit ${no_dep_exit_code} fi ``` However, `command -v` exits with an error if the command does not exist. This results in the nice error message not being shown. The solution is to avoid the assignment of the variable erroring and instead relying on the executability check to make sure we have the right thing ## `md5` compatibility The test script depends on `md5sum` which is not available on MacOS. Thus, tests would fail at the start when run on MacOS. MacOS has a tool called `md5`, which when called with the `-r` flag which reverses the format of the output.
- Loading branch information
Showing
3 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters