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 flag to oc new-build to produce no output #6101

Merged

Conversation

rhcarvalho
Copy link
Contributor

Closes #5296.

@rhcarvalho
Copy link
Contributor Author

@bparees @smarterclayton PTAL
[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 96fd8c2

@bparees
Copy link
Contributor

bparees commented Nov 30, 2015

add a validation error if they specify "--to" or "--to-docker" and "--no-output"?

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/7534/)

@rhcarvalho
Copy link
Contributor Author

add a validation error if they specify "--to" or "--to-docker" and "--no-output"?

I had thought of it and tried that out earlier and chose to not attempt to throw errors and simply produce no output (meaning --no-output takes precedence).

Reasoning (AFAICT):

  1. there's no standard way in cobra to declare mutually exclusive flags.

  2. there's no clean way to tell whether a flag was not provided vs. it was provided with the zero-value for its type. Unless manually reparsing the args, these would behave the same:

    oc new-build <src> --to-docker=false --to '' --no-output
    oc new-build <src> --no-output
    

@bparees
Copy link
Contributor

bparees commented Nov 30, 2015

good enough for me. thanks.
[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4184/) (Image: devenv-rhel7_2835)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 96fd8c2

openshift-bot pushed a commit that referenced this pull request Nov 30, 2015
@openshift-bot openshift-bot merged commit a8109cb into openshift:master Nov 30, 2015
@rhcarvalho rhcarvalho deleted the issue5296-newbuild-nooutput branch November 30, 2015 18:18
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.

None yet

3 participants