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

Feature request: Add non interactive OPTION on remove ( ex: hub-tool tag rm --yes ... ) #202

Open
jb68 opened this issue Feb 3, 2022 · 2 comments

Comments

@jb68
Copy link

jb68 commented Feb 3, 2022

Wrong exit code

I am trying to automate a repository pruning using circleci, While the command succeeded exit code is wrong

/usr/bin/yes | hub-tool/hub-tool tag rm $image
Are you sure you want to delete the image tagged "features-***" from repository "*******/h***"? [y/N] Deleted *******/h***:features-***

Exited with code exit status 141
CircleCI received exit code 141

Steps to reproduce the issue:
As of now I cannot reproduce this issue on my comp

yes | ./hub-tool/hub-tool tag rm jb68/fossology:latest
WARNING: You are about to permanently delete image "jb68/fossology:latest"
         This action is irreversible
Are you sure you want to delete the image tagged "latest" from repository "jb68/fossology"? [y/N] Deleted jb68/fossology:latest
[jb:~/opt] 7s $ echo $?
0

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Output of hub-tool --version:

(paste your output here)

Output of docker version:

(paste your output here)

Output of docker info:

(paste your output here)

Additional environment details (AWS, VirtualBox, physical, etc.):

@jb68
Copy link
Author

jb68 commented Feb 3, 2022

turns out is a yes issue so this ticket is about a feature request
https://stackoverflow.com/questions/53126057/using-yes-with-interactive-script-results-in-exit-code-141

@jb68 jb68 changed the title Command succeeded exit code 141 is wrong Feature request: Add non interactive possibility on remove ( ex: hub-tool tag rm --yes ... ) Feb 3, 2022
@jb68 jb68 changed the title Feature request: Add non interactive possibility on remove ( ex: hub-tool tag rm --yes ... ) Feature request: Add non interactive OPTION on remove ( ex: hub-tool tag rm --yes ... ) Feb 3, 2022
@shariqmus
Copy link

hub-tool tag rm -f image:tag

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

No branches or pull requests

2 participants