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

Shouldn't holo-files apply exit with a non-zero code on error? #19

Open
LukeShu opened this issue Jan 5, 2017 · 1 comment
Open

Shouldn't holo-files apply exit with a non-zero code on error? #19

LukeShu opened this issue Jan 5, 2017 · 1 comment

Comments

@LukeShu
Copy link
Contributor

LukeShu commented Jan 5, 2017

In holo-files/impl.TargetFile.Apply() if there is an error, it is logged to os.Stderr, then discarded.

	if err != nil {
		fmt.Fprintf(os.Stderr, "!! %s\n", err.Error())
	}

This seems to me to contradict holo-plugin-interface(7), which says

The apply operation

...

If an error occurred during provisioning, the plugin shall exit with non-zero exit code.

So if holo-files/impl.TargetFile.Apply() encounters an error, shouldn't avoid having a zero exit code? Or is this a bug in the documentation?

Note that if holo-files is modified to have a non-zero exit code in this case, then the test suite would need adjusted, as holo would start spitting out !! exit status 1 lines in response; and the test suite won't be expecting them.

@majewsky
Copy link
Contributor

majewsky commented Jan 5, 2017

Sounds plausible, but I distantly remember that there was a reason for doing it this way. I will check during my next meditation. :)

LukeShu pushed a commit to LukeShu/holo that referenced this issue Jan 6, 2017
LukeShu pushed a commit to LukeShu/holo that referenced this issue Jan 11, 2017
LukeShu pushed a commit to LukeShu/holo that referenced this issue Jan 11, 2017
LukeShu pushed a commit to LukeShu/holo that referenced this issue Jan 11, 2017
LukeShu pushed a commit to LukeShu/holo that referenced this issue Jan 11, 2017
LukeShu pushed a commit to LukeShu/holo that referenced this issue Jan 11, 2017
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

2 participants