Skip to content

Commit

Permalink
try extension first before shortcuts (#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
joehand committed Apr 4, 2019
1 parent 51d1342 commit 9ba4645
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ function syncShorthand (opts) {
if (!opts._.length) return usage(opts)
debug('Sync shortcut command')

debug('Trying extension', opts._[0])
// First try extension
if (config.extensions.indexOf(opts._[0]) > -1) return require('../src/extensions')(opts)

var parsed = require('../src/parse-args')(opts)

// Download Key
Expand All @@ -138,9 +142,6 @@ function syncShorthand (opts) {
return require('../src/commands/share').command(opts)
}

// If directory sync fails, finally try extension
if (config.extensions.indexOf(opts._[0]) > -1) return require('../src/extensions')(opts)

// All else fails, show usage
return usage(opts)
}
Expand Down

0 comments on commit 9ba4645

Please sign in to comment.