diff --git a/lib/open.js b/lib/open.js index ce4e9aa..fcb3dbb 100644 --- a/lib/open.js +++ b/lib/open.js @@ -28,9 +28,13 @@ function open(target, appName, callback) { switch (process.platform) { case 'darwin': if (appName) { - opener = 'open -a "' + escape(appName) + '"'; + if (appName === '--background') { + opener = 'open -g '; + } else { + opener = 'open -a "' + escape(appName) + '"'; + } } else { - opener = 'open'; + opener = 'open'; } break; case 'win32':