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

install sh script: Do not "exit 1" if yarn already installed #829

Merged
merged 1 commit into from
Oct 14, 2016

Conversation

PlugIN73
Copy link
Contributor

Summary

I think it's bad idea to exit 1 in this case - because this script can't be used in pipeline or in ansible. Throwing exception breaks next movements. If Yarn already installed this script - it will warn and normally exited with exit code 0.
What do you think?

I think it's bad idea to exit 1 in this case - because this script can't be used in pipeline or in ansible. Throwing exception breaks next movements. If Yarn already installed this script - it will warn and normally exited with exit code 0.
What do you think?
@Sjolus
Copy link

Sjolus commented Oct 12, 2016

Exit code 0 should indicate a successful completion of the intended task. If something is already installed then it should not be installed again, hence it should indicate it not performing the desired task when exiting.

Not sure what you mean by pipelines specifically, but you should not be installing yarn if it's already installed. I suggest making some conditional stuff in your Ansible playbooks/tasks instead.

http://docs.ansible.com/ansible/playbooks_conditionals.html

@Daniel15
Copy link
Member

If you're on Linux, I'd suggest using the package repos rather than the installer script, particularly if you're trying to script the environment.

@sebmck sebmck merged commit ae0caa3 into yarnpkg:master Oct 14, 2016
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

4 participants