Closed jfryman closed 8 years ago
Nice, this should save us some time when troubleshooting user problems. :+1:
I will test it tomorrow.
:+1:
@lakshmi-kannan or if you want / have time, you can test it as well :P
Pushed a change since -
is apparently not a valid character for a function name in sh
.
I did actually suggest we should just default to bash
, but other people thought defaulting to sh
is better :P
I also updated "script/preflight-os" to also use this new function since this was actually the main offending part which logged to a file instead of stdout / stderr.
I did actually suggest we should just default to bash, but other people thought defaulting to sh is better :P
😐
In confirmed it now works with the latest changes:
Ensuring pre-flight libraries are setup...
Running bundle install --path vendor/bundle --deployment --binstubs...
Installing rake (10.3.2) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/rake-10.3.2.gemspec
Installing CFPropertyList (2.2.8) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/CFPropertyList-2.2.8.gemspec
Installing i18n (0.7.0) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/i18n-0.7.0.gemspec
Installing json (1.8.3) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/json-1.8.3.gemspec
Installing minitest (5.8.0) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/minitest-5.8.0.gemspec
Installing thread_safe (0.3.5) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/thread_safe-0.3.5.gemspec
Installing tzinfo (1.2.2) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/tzinfo-1.2.2.gemspec
Installing activesupport (4.2.3) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/activesupport-4.2.3.gemspec
Installing builder (3.2.2) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/builder-3.2.2.gemspec
Installing activemodel (4.2.3) from /opt/puppet/vendor/bundle/ruby/1.9.1/specifications/activemodel-4.2.3.gemspec
...
I will test it some more and if everything looks OK merge it into master.
Tested it on multiple servers with and without DEBUG
environment variable. It appears to be working OK so I will go ahead and merge it.
This PR adds some helpers that allows executed commands to properly make it to a log file or STDOUT/STDERR based on setting the
DEBUG
ENV variable./cc @Kami