- 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:
@@ -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>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user