-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install process does not stop when installing without git
command
#359
Comments
Good catch!! Want to try to solve it, @smeghead ?
# add this function at the top above `get_latest_tag (eg line 7)`
function check_git_is_installed() {
if ! command -v git >/dev/null 2>&1; then
echo "Error: git is not installed." >&2
exit 1
fi
}
# then call this function before calling the `install` (eg line 57) |
@Chemaclass |
Or maybe you can remove the git dependency from the installer, if you can do that I think that would also be a valid solution. Basically, it would be that the installer does not require the use of git |
@khru I will make another pull request when I come up with idea. |
I think it's not possible to remove
|
@Chemaclass When installing a version other than I was wondering if it is possible to get the For example, it might be possible to get the information from the following URL. (However, I find it more stable and reliable to get it from the curl -s https://api.github.com/repos/TypedDevs/bashunit/tags The above is a possibility. |
Summary
When installing in an environment where the
git
command does not exist, the messagebashunit has been installed in the 'lib' folder
appears even though the installation fails.Current behavior
If you run the installation in an environment where the
git
command does not exist, you will get the following output.An error message is displayed because the
git
command does not exist.However, the process continues and
bashunit has been installed
is also displayed.How to reproduce
Perform the installation in an environment where the
git
command does not exist.Expected behavior
If the
git
command is not present during installation, an error message is displayed and the process should stop.If users see the message
bashunit has been installed in the 'lib' folder
, users may think that the installation was successful.The text was updated successfully, but these errors were encountered: