Skip to content

Commit

Permalink
launch correctly from finder and command line
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Link committed May 5, 2019
1 parent 0c2f752 commit 3fdb52b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mdp",
"version": "0.0.8",
"version": "0.0.9",
"license": "Apache-2.0",
"repository": "https://github.com/ericlink/mdp",
"productName": "mdp",
Expand Down
6 changes: 2 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ const setGlobalFile = (file) => {
}

const processArgs = (argv) => {
// darwin is handled by open-file event, skip this
if (process.platform === 'darwin') return;

const lastArg = argv[argv.length-1];
if (argv && argv.length > 1 && lastArg !== './src/main.js') {
const macFinderArgPrefixProcessSerialNumber = '-psn';
if (argv && argv.length > 1 && lastArg !== './src/main.js' && !lastArg.startsWith(macFinderArgPrefixProcessSerialNumber)) {
setGlobalFile(lastArg);
}
}
Expand Down

0 comments on commit 3fdb52b

Please sign in to comment.