fix ls not working on dir

This commit is contained in:
Olivier Gagnon 2021-09-22 00:48:13 -04:00
parent 8eeed583c2
commit 43f0746be7

@ -39,7 +39,7 @@ export function ls(
} }
// If the second argument is not a pipe, then it must be for listing a directory // If the second argument is not a pipe, then it must be for listing a directory
if (numArgs >= 2 && args[0] !== "|") { if (numArgs >= 1 && args[0] !== "|") {
const newPath = evaluateDirectoryPath(args[0] + "", terminal.cwd()); const newPath = evaluateDirectoryPath(args[0] + "", terminal.cwd());
prefix = newPath ? newPath : ""; prefix = newPath ? newPath : "";
if (prefix != null) { if (prefix != null) {