Permalink
Browse files

Allow setting options.command to override default

  • Loading branch information...
1 parent d21a3ff commit dec13194d81b03278c153cac769908d39ccf5d12 @isaacs committed Sep 13, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 opener.js
View
@@ -19,6 +19,15 @@ function opener(args, options, callback) {
options = {};
}
+ if (options && typeof options === "object" && options.command) {
+ if (process.platform === "win32") {
+ // *always* use cmd on windows
+ args = [options.command].concat(args);
+ } else {
+ cmd = options.command;
+ }
+ }
+
if (process.platform === "win32") {
// On Windows, we really want to use the "start" command. But, the rules regarding arguments with spaces, and
// escaping them with quotes, can get really arcane. So the easiest way to deal with this is to pass off the

0 comments on commit dec1319

Please sign in to comment.