summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-12-01 14:50:03 -0800
committerDaniel DeLeo <dan@opscode.com>2011-12-01 14:50:03 -0800
commit3c83ba989ec6a181e1b69779e6972a8059ee1153 (patch)
tree71b3438de8d178e7a2faff83d77adea7cc4e5ea4 /README.md
parentc65580392b2297d0a576f0ae6cc13718b173f933 (diff)
downloadmixlib-shellout-3c83ba989ec6a181e1b69779e6972a8059ee1153.tar.gz
github's markdown wants more spaces
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 88afecd..e6cdc65 100644
--- a/README.md
+++ b/README.md
@@ -10,14 +10,21 @@ Invoke find(1) to search for .rb files:
find = Mixlib::ShellOut.new("find . -name '*.rb'")
find.run_command
+
If all went well, the results are on `stdout`
+
puts find.stdout
+
`find(1)` prints diagnostic info to STDERR:
+
puts "error messages" + find.stderr
+
Raise an exception if it didn't exit with 0
+
find.error!
Run a command as the `www` user with no extra ENV settings from `/tmp`
+
cmd = Mixlib::ShellOut.new("apachectl", "start", :user => 'www', :env => nil, :cwd => '/tmp')
cmd.run_command # etc.