Skip to content

Commit 28a1228

Browse files
committed
added "--background" options
1 parent 2d20d7c commit 28a1228

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/open.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ function open(target, appName, callback) {
2727

2828
switch (process.platform) {
2929
case 'darwin':
30-
if (appName) {
31-
opener = 'open -a "' + escape(appName) + '"';
30+
if (appName) {
31+
if (appName === '--background') {
32+
opener = 'open -g ';
3233
} else {
33-
opener = 'open';
34+
opener = 'open -a "' + escape(appName) + '"';
3435
}
36+
} else {
37+
opener = 'open';
38+
}
3539
break;
3640
case 'win32':
3741
// if the first parameter to start is quoted, it uses that as the title

0 commit comments

Comments
 (0)