-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
new-app/new-build: display warning if git not installed #10226
Conversation
@bparees ptal |
} | ||
_, err := exec.LookPath(gitBinary) | ||
if err != nil { | ||
fmt.Fprintf(w, "warning: Cannot find git. Ensure that it is installed and in your path.\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this align w/ the formatting we use for other warnings like when we create a binary build?
it would also be nice if we could (concisely) also explain the implications of not finding git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It matches the format of other CLI warnings/errors.
warning: blah
error: blah
However, it doesn't match the warning we include when doing a binary build because that's part of the output of a successful run. With git, I think we want to show the warning regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the message itself, does this work?
"warning: Cannot find git. Ensure that it is installed and in your path. Git is required to work with git repositories.\n"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
93928ff
to
0b6008e
Compare
lgtm [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7606/) (Image: devenv-rhel7_4774) |
Evaluated for origin merge up to 0b6008e |
[Test]ing while waiting on the merge queue |
Evaluated for origin test up to 0b6008e |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7557/) |
Displays a warning if git is not installed when running new-app/new-build