Skip to content

Commit

Permalink
If options is a function, then it's a callback
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 13, 2012
1 parent ca74e19 commit d21a3ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opener.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ function opener(args, options, callback) {
args = [args];
}

if (typeof options === "function") {
callback = options;
options = {};
}

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
Expand Down

0 comments on commit d21a3ff

Please sign in to comment.