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

branching #13

Closed
schmurfy opened this issue Jun 14, 2012 · 1 comment
Closed

branching #13

schmurfy opened this issue Jun 14, 2012 · 1 comment

Comments

@schmurfy
Copy link

Hi,
I was curious how you would handle the case where conditional code is required, something like

if something is installed then
  install this
else
  install that
@rstacruz
Copy link
Member

It can be done, but it should be done in Bash code, not Ruby. Perhaps:

queue %{
  if which -s java; then
    npm install -g jcoffeescript
  else
    npm install -g coffeescript
  fi
}
# (Hypothetical example. There isn't a jcoffeescript package, if you're wondering.)

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