Skip to content

Commit 5e6d60b

Browse files
committed
feature(spawnify) isCWD
1 parent d7a56e7 commit 5e6d60b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/spawnify.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ module.exports = (command, options) => {
3030

3131
assert(command, 'command could not be empty!');
3232

33-
if (options.cwd)
34-
options.cwd = untildify(options.cwd);
35-
else
36-
options.cwd = process.cwd()
33+
const isCWD = options.cwd;
34+
const cwd = isCWD ? untildify(options.cwd) : process.cwd();
3735

38-
return new Spawnify(command, options);
36+
return new Spawnify(command, Object.assign({}, options, {
37+
cwd
38+
}));
3939
};
4040

4141
function Spawnify(command, options) {

0 commit comments

Comments
 (0)