Open matthewmueller opened 10 years ago
Haha yikes! Can we check duo-*
flags? Force users to chmod +x
their subcommand?
+1, i think that's a great idea. aren't we doing a stat() call anyway to check for existence?
oh, wait i think i misunderstood. aren't most plugins just source and not executables?
Can we test for duo-*
prefix regardless for the dep? Forcing people to prefix their plugins with duo-
wouldn't be the worst yeah? Maybe I'm misunderstanding
yah, we do that already, those repos are duo-watch
, duo-jade
, etc.
aren't most plugins just source and not executables
nope:
stephenmathieson at MBP in ~/repos/duo on master
$ ls -lsa bin/
total 56
0 drwxr-xr-x 6 stephenmathieson staff 204 Aug 22 09:00 .
0 drwxr-xr-x 18 stephenmathieson staff 612 Aug 22 09:00 ..
24 -rwxr-xr-x 1 stephenmathieson staff 8425 Aug 21 14:03 _duo
8 -rwxr-xr-x 1 stephenmathieson staff 434 Aug 22 09:00 duo
16 -rwxr-xr-x 1 stephenmathieson staff 4200 Aug 21 14:03 duo-duplicates
8 -rwxr-xr-x 1 stephenmathieson staff 3059 Aug 21 14:03 duo-ls
and:
stephenmathieson at MBP in ~/repos/duo-test on master
$ ls -lsa bin/
total 40
0 drwxr-xr-x 7 stephenmathieson staff 238 Aug 5 15:34 .
0 drwxr-xr-x 14 stephenmathieson staff 476 Aug 5 15:34 ..
8 -rw-r--r-- 1 stephenmathieson staff 72 Aug 5 15:34 browsers.json
8 -rwxr-xr-x 1 stephenmathieson staff 1290 Aug 5 15:34 duo-test
8 -rwxr-xr-x 1 stephenmathieson staff 2236 Aug 5 15:34 duo-test-browser
8 -rwxr-xr-x 1 stephenmathieson staff 1620 Aug 5 15:34 duo-test-phantomjs
8 -rwxr-xr-x 1 stephenmathieson staff 3693 Aug 5 15:34 duo-test-saucelabs
hmm just thought of something: if we stat(plugin)
and check for +x
, windows users will suffer. iirc, windows doesn't have any concept of flags...
oh duh, i was thinking about the plugins, can't we just pull from bin/
and node_modules/.bin/
?
node_modules/.bin
yep! good idea!
By including
node_modules/
, duo will now take commands like:I think we might need to do something about this, what do you guys think?
/cc @dominicbarnes @stephenmathieson: