Skip to content

Commit 9edbdbf

Browse files
committed
Merge branch 'AcklenAvenue-templatize-cwd'
2 parents 0ee7666 + 0817c39 commit 9edbdbf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ type: `String`
122122

123123
default: [`process.cwd()`](http://nodejs.org/api/process.html#process_process_cwd)
124124

125-
Sets the current working directory for the command.
125+
Sets the current working directory for the command. This can be a [template][] which can be interpolated by some [file][] info (e.g. `file.path`).
126+
127+
[template]: http://lodash.com/docs#template
126128

127129
#### options.templateData
128130

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function runCommands(commands, options, file, done) {
4949

5050
var child = exec(command, {
5151
env: options.env,
52-
cwd: options.cwd,
52+
cwd: gutil.template(options.cwd, context),
5353
maxBuffer: options.maxBuffer,
5454
timeout: options.timeout
5555
}, function (error, stdout, stderr) {

0 commit comments

Comments
 (0)