Skip to content

Commit 3857c12

Browse files
Jake ChampionJakeChampion
authored andcommitted
print unknown arguments to stderr
1 parent 940b35b commit 3857c12

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/parseInputs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function parseInputs(cliInputs) {
5959
}
6060
break;
6161
} else if (cliInput.startsWith("-")) {
62-
unknownArgument();
62+
unknownArgument(cliInput);
6363
} else {
6464
if (!customInputSet) {
6565
customInputSet = true;
@@ -76,7 +76,7 @@ export async function parseInputs(cliInputs) {
7676
output = join(process.cwd(), cliInput);
7777
}
7878
} else {
79-
unknownArgument();
79+
unknownArgument(cliInput);
8080
}
8181
}
8282
}

src/unknownArgument.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function unknownArgument() {
1+
export function unknownArgument(cliInput) {
22
console.error(`error: Found argument '${cliInput}' which wasn't expected, or isn't valid in this context
33
44
USAGE:

0 commit comments

Comments
 (0)