From 3cfffed7ec510c296b4d185de38c2c05f5213a11 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 27 Feb 2022 16:07:35 -0500 Subject: [PATCH] Document spawn options to sh method --- doc/user_guide.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/user_guide.md b/doc/user_guide.md index 99cdc25..13748f1 100644 --- a/doc/user_guide.md +++ b/doc/user_guide.md @@ -1508,6 +1508,18 @@ default do end ``` +Options that Ruby's `spawn` method accepts can also be passed in to the `sh` +method. +For example, to execute the given command with a different working directory, +the `:chdir` option can be specified: + +```ruby +default do + # Execute 'ls' from within the 'src' directory: + sh "ls", chdir: "src" +end +``` + ##> Extending Rscons ### Adding New Languages