forked from tools/josh
Fix help resolution type detection
This commit is contained in:
parent
66414bac8b
commit
284c21534e
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "fwdekker.com",
|
"name": "fwdekker.com",
|
||||||
"version": "0.40.3",
|
"version": "0.40.4",
|
||||||
"description": "The source code of [my personal website](https://fwdekker.com/).",
|
"description": "The source code of [my personal website](https://fwdekker.com/).",
|
||||||
"author": "Felix W. Dekker",
|
"author": "Felix W. Dekker",
|
||||||
"browser": "dist/bundle.js",
|
"browser": "dist/bundle.js",
|
||||||
|
|
|
@ -607,7 +607,7 @@ return new Command(
|
||||||
streams.out.write("\\n\\n");
|
streams.out.write("\\n\\n");
|
||||||
|
|
||||||
const command = josh.interpreter.resolve(commandName);
|
const command = josh.interpreter.resolve(commandName);
|
||||||
if (command === undefined) {
|
if (command === undefined || command instanceof Directory) {
|
||||||
streams.err.writeLine(\`help: Unknown command '\${commandName}'.\`);
|
streams.err.writeLine(\`help: Unknown command '\${commandName}'.\`);
|
||||||
return ExitCode.USAGE;
|
return ExitCode.USAGE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue