File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
packages/openneuro-cli/src Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,16 @@ commander
74
74
. option ( '-s, --snapshot [snapshotVersion]' )
75
75
. action ( ls )
76
76
77
- commander . parse ( process . argv )
78
-
79
- if ( process . argv [ 1 ] . endsWith ( 'git-credential-openneuro' ) ) {
80
- gitCredential ( )
81
- } else if ( process . argv [ 1 ] . endsWith ( 'git-annex-remote-openneuro' ) ) {
82
- gitAnnexRemote ( )
83
- } else if ( ! process . argv . slice ( 2 ) . length ) {
84
- commander . help ( )
77
+ function main ( argv ) {
78
+ if ( argv . endsWith ( 'git-credential-openneuro' ) ) {
79
+ gitCredential ( )
80
+ } else if ( argv . endsWith ( 'git-annex-remote-openneuro' ) ) {
81
+ gitAnnexRemote ( )
82
+ } else if ( ! process . argv . slice ( 2 ) . length ) {
83
+ commander . help ( )
84
+ } else {
85
+ commander . parse ( process . argv )
86
+ }
85
87
}
88
+
89
+ main ( process . argv )
You can’t perform that action at this time.
0 commit comments