You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/_tools/utils/rawgit-url/bin/cli
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -102,11 +102,14 @@ function main() {
102
102
})
103
103
});
104
104
105
-
// Get any provided command-line arguments:
106
-
args=cli.args();
107
-
108
105
// Get any provided command-line options:
109
106
flags=cli.flags();
107
+
if(flags.help||flags.version){
108
+
return;
109
+
}
110
+
111
+
// Get any provided command-line arguments:
112
+
args=cli.args();
110
113
111
114
opts={};
112
115
opts.file=args[0];
@@ -119,8 +122,7 @@ function main() {
119
122
fcn=wrap(getSlug);
120
123
tmp=fcn();
121
124
if(instanceOf(tmp,Error)){
122
-
process.exitCode=1;
123
-
returnconsole.error('Error: %s','\nError encountered while generating a RawGit URL. If no slug is provided, ensure that the current working directory is a Git repository.\n\n');// eslint-disable-line no-console
125
+
returncli.error(newError('\nError encountered while generating a RawGit URL. If no slug is provided, ensure that the current working directory is a Git repository.\n\n'));
0 commit comments