Skip to content

Commit

Permalink
Made CWD changeable
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Apr 11, 2024
1 parent f9edc06 commit 6b9a10b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/emulation/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ https://raw.githubusercontent.com/nodejs/node/3907bd1/lib/path.js

import type { ParsedPath } from 'node:path';

export const cwd = '/';
export let cwd = '/';

export function cd(path: string): void {
cwd = resolve(cwd, path);
}

export const sep = '/';

Expand Down

0 comments on commit 6b9a10b

Please sign in to comment.