Permalink
Browse files

If options is a function, then it's a callback

  • Loading branch information...
1 parent ca74e19 commit d21a3ffac5e1c92c60cd8c1fca23aff759bcd293 @isaacs committed Sep 13, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 opener.js
View
@@ -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

0 comments on commit d21a3ff

Please sign in to comment.