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

@@ -32,7 +32,7 @@ I64 @shell_cmd_cat(@shell* sh, I64 argc, U8** argv)
filename = @shell_expand_relative_path(sh, argv[i]);
if (!FileSystem.PathExists(filename)) {
res = 2;
StrPrint(&msg, "cat: cannot access '%s': No such file or directory\n", filename);
StrPrint(&msg, "cat: cannot access '%s': No such file or directory\n", argv[i]);
Stdio.WriteLine(sh, &msg);
} else {
buf = FileSystem.ReadFile(filename, &size);