System/Shell/Commands: Use original argv as pathname in error messages

This commit is contained in:
Alec Murphy
2025-09-20 10:24:25 -04:00
parent 3d2cc73e43
commit 682ca552d3
3 changed files with 4 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ I64 @shell_cmd_ls_output(@shell* sh, U8* arg_path, I64 flags)
U8 buf[512];
U8* path = @shell_expand_relative_path(sh, arg_path);
if (!FileSystem.PathExists(path)) {
StrPrint(&buf, "ls: cannot access '%s': No such file or directory\n", path);
StrPrint(&buf, "ls: cannot access '%s': No such file or directory\n", arg_path);
Stdio.WriteLine(sh, &buf);
Free(path);
return 2;