Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xudafeng/gitopen into xud…
Browse files Browse the repository at this point in the history
…afeng-master
  • Loading branch information
hotoo committed Jul 13, 2015
2 parents 564cfca + ed41361 commit 004c39d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bin/gitopen
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,13 @@ if (commander.verbose) {
console.log(url);
}

if (process.platform === 'win32' || process.platform === 'win64') {
child_process.execSync('start ' + url);
} else { // darwin, unix, linux.
child_process.execSync('open ' + url);
var platform = process.platform;
var shell = 'start';

if (platform !== 'win32') {
shell = platform === 'linux' ? 'xdg-open' : 'open';
}

child_process.execSync(shell + ' ' + url);

// vim:ft=javascript

0 comments on commit 004c39d

Please sign in to comment.