Permalink
Browse files

regexify the --drone option

  • Loading branch information...
1 parent 71776b8 commit ea7a1d350dc416d3f351c927290d0760909748f4 @substack committed Feb 29, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/argv.js
View
@@ -10,6 +10,11 @@ var args = argv._.reduce(function (acc, arg) {
argv.remote = argv.remote || args.remote;
argv._ = args._;
+if (typeof argv.drone === 'string' && argv.drone.match(/^\/.*\/\w*$/)) {
+ var m = argv.drone.match(/^\/(.*)\/(\w*$)/);
+ argv.drone = new RegExp(m[1], m[2]);
+}
+
var target = remote.get(argv.remote || 'default');
if (target && !argv.hub) argv.hub = target.hub;
if (target && !argv.secret) argv.secret = target.secret;

0 comments on commit ea7a1d3

Please sign in to comment.