thanks. I agree, using && instead of ; solves the problem. however, again, there are many puppet modules which use concatenated commands, without realising about this problem. and so, I am suggesting that puppet should enable the "set -e" behavior by default.
Regards, David On Monday, March 10, 2014 9:00:04 PM UTC+1, Paul Tötterman wrote: > > in bash, for example, if you type "set -e" first, bash will stop and fail >> as soon as a concatenated command fails. >> (i agree that this behaviour is unfortunatelly not enabled by default in >> bash scripts) >> >>> exec {'test': >>>> command => "/bin/ls /doesnotexit; /bin/echo hello", >>>> } >>>> >>> > Use: > > exec { 'test': > command => '/bin/ls /doesnotexist && /bin/echo hello', > } > > Cheers, > Paul > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/05d8ba97-4c12-414b-a821-f9276b9e6a1d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.