Skip to content
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

Merged
merged 1 commit into from
Aug 6, 2016

Conversation

csrwng
Copy link
Contributor

@csrwng csrwng commented Aug 4, 2016

Displays a warning if git is not installed when running new-app/new-build

@csrwng
Copy link
Contributor Author

csrwng commented Aug 4, 2016

@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")
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@csrwng csrwng force-pushed the newapp_gitwarning branch from 93928ff to 0b6008e Compare August 5, 2016 14:10
@bparees
Copy link
Contributor

bparees commented Aug 5, 2016

lgtm [merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Aug 5, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7606/) (Image: devenv-rhel7_4774)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 0b6008e

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 0b6008e

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7557/)

@openshift-bot openshift-bot merged commit bd3bc5e into openshift:master Aug 6, 2016
@csrwng csrwng deleted the newapp_gitwarning branch December 21, 2016 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants