Skip to content

Commit

Permalink
fix(cli): Fix argv handling from 4.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nellh committed Nov 12, 2023
1 parent 2f939f1 commit 97f3d64
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 91 deletions.
8 changes: 4 additions & 4 deletions packages/openneuro-cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ commander
.action(ls)

function main(argv) {
if (argv.endsWith('git-credential-openneuro')) {
if (argv[1].endsWith('git-credential-openneuro')) {
gitCredential()
} else if (argv.endsWith('git-annex-remote-openneuro')) {
} else if (argv[1].endsWith('git-annex-remote-openneuro')) {
gitAnnexRemote()
} else if (!process.argv.slice(2).length) {
} else if (!argv.slice(2).length) {
commander.help()
} else {
commander.parse(process.argv)
commander.parse(argv)
}
}

Expand Down
Loading

0 comments on commit 97f3d64

Please sign in to comment.