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

error when selector does not match anything #164

Closed
sstarcher opened this issue Jun 11, 2018 · 6 comments
Closed

error when selector does not match anything #164

sstarcher opened this issue Jun 11, 2018 · 6 comments

Comments

@sstarcher
Copy link
Contributor

If I run helmfile -l name=bob sync and we have no release named bob I would expect helmfile to exit with an error. Currently it exists with a code of 0.

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 12, 2018

Good catch! Thats should be fixed.

@lswith
Copy link

lswith commented Jul 17, 2018

I just encountered the opposite of this. If I have nothing that matches the selector, I would expect an error but I would also like to silence this or have a seperate error to the normal error.

Mainly I use helmfile in this way:

helmfile -f ./path/to/helmfile --selector state!=active delete
helmfile -f ./path/to/helmfile --selector state=active sync

This allows me to delete from code rather than manually. The problem is when there is nothing to delete, helmfile errors out. This should be a different error to when something is failing to delete.

@mumoshu
Copy link
Collaborator

mumoshu commented Aug 22, 2018

@lswith Good point!
Would an exit code of 2 suffice your need?

@mumoshu
Copy link
Collaborator

mumoshu commented Aug 22, 2018

@lswith Anyway, opened #219 for that.

@mumoshu mumoshu closed this as completed Aug 22, 2018
@mumoshu
Copy link
Collaborator

mumoshu commented Aug 22, 2018

I'm closing this as the original issue has been resolved via #165

@lswith
Copy link

lswith commented Aug 23, 2018

👍

raxod502-plaid pushed a commit to raxod502-plaid/helmfile that referenced this issue Jun 30, 2022
* docker build test on ci

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix issue

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix issue

Signed-off-by: yxxhero <aiopsclub@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants