- moved uint8array concat and split functions to their own files

- fixed an error in the cd command as a result of a previous improvement
This commit is contained in:
2026-08-30 08:38:05 +02:00
parent f1b69bb282
commit d0f8376244
7 changed files with 58 additions and 69 deletions
+2 -7
View File
@@ -10,7 +10,7 @@ import {
type PermissionDeniedError,
type ShellError,
} from "@core/util/errors";
import { resolveInode, resolvePath } from "@core/util/path_resolver";
import { resolvePath } from "@core/util/path_resolver";
export const COMMAND_NAME = "cd";
@@ -58,12 +58,7 @@ async function main(
if (state.filesystem.isFile(inode)) {
return {
state,
result: createErrorResult(
"PathResolutionError",
"No such file or directory",
{ path: resolveInode(state.filesystem, inode) },
COMMAND_NAME,
),
result: createErrorResult("PathResolutionError", "Not a directory", { path: args[0]! }, COMMAND_NAME),
} satisfies CommandOutput<PathResolutionError>;
}