From df55e9f3adb07befc4cad1ee6be02fad3a2a3369 Mon Sep 17 00:00:00 2001 From: Lisa Milne Date: Sun, 12 Nov 2023 21:22:48 +1000 Subject: [PATCH] simplify which and type a bit --- clite/core.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/clite/core.js b/clite/core.js index e622620..c631106 100644 --- a/clite/core.js +++ b/clite/core.js @@ -1345,10 +1345,8 @@ clite.shell = { return; }else{ var path = clite.shell.resolvePath(args[1]); - var fd = clite.io.open(path,false); - if (!fd) + if (!path) return; - clite.io.close(fd); io.write(args[1]+' is '+path); } }, @@ -1359,10 +1357,8 @@ clite.shell = { io.write(args[1]+' is a shell builtin'); }else{ var path = clite.shell.resolvePath(args[1]); - var fd = clite.io.open(path,false); - if (!fd) + if (!path) return; - clite.io.close(fd); io.write(args[1]+' is '+path); } },