colinmollenhour/modman

modman-installer returns exit status of 2

cobhimself opened this issue · 3 comments

I'm using puppet to provision a vagrant machine and I'm having trouble with the modman-installer command returning 2 instead of 0 for success.

I've looked at wget's exit codes and it says that an exit code of 2 represents a command line argument parsing error. The installer command within the readme IS indeed correct so this error should not be coming from wget. Do you know of any reason why an exit code of 2 would be returned in modman-installer even if I explicitly end the modman-installer shell script with exit 0?

If interested, here are the puppet commands I'm using:

package { 'wget':
  ensure => present,
}

exec { '/bin/bash < <(wget -O - https://raw.github.com/colinmollenhour/modman/master/modman-installer)':
  creates => "/home/vagrant/bin/modman",
  require => Package['wget'],
}

No idea... Did you try this?

exec { 'wget -O /home/vagrant/bin/modman https://raw.github.com/colinmollenhour/modman/master/modman':
  creates => "/home/vagrant/bin/modman",
  require => Package['wget'],
}

That works to get the modman script into the home directory's bin folder but it doesn't help setup the path to the user's home bin folder (which is what is great about the momdan-installer). I suppose I could execute the conditional statements found within the modman-installer script through puppet's exec commands but that will cause issues if the modman-installer script ever changes.

It is just a script that goes in your $PATH, I don't see why it would change. The installer is just good for users who aren't already familiar with managing their $PATH.