We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7a56e7 commit 5e6d60bCopy full SHA for 5e6d60b
lib/spawnify.js
@@ -30,12 +30,12 @@ module.exports = (command, options) => {
30
31
assert(command, 'command could not be empty!');
32
33
- if (options.cwd)
34
- options.cwd = untildify(options.cwd);
35
- else
36
- options.cwd = process.cwd()
+ const isCWD = options.cwd;
+ const cwd = isCWD ? untildify(options.cwd) : process.cwd();
37
38
- return new Spawnify(command, options);
+ return new Spawnify(command, Object.assign({}, options, {
+ cwd
+ }));
39
};
40
41
function Spawnify(command, options) {
0 commit comments