Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/workerd/api/node/tests/process-nodejs-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ export const processLoadEnvFile = {
// supports cwd
{
const originalCwd = process.cwd();
process.chdir('/tmp');
writeFileSync('.env', validEnv);
try {
process.loadEnvFile();
Expand Down Expand Up @@ -793,8 +794,7 @@ assert.deepStrictEqual(readdirSync('.'), ['bundle', 'tmp', 'dev']);

export const processCwd = {
test() {
// cwd gets changed by iocontext
assert.strictEqual(process.cwd(), '/tmp');
assert.strictEqual(process.cwd(), '/bundle');

const originalCwd = process.cwd();

Expand Down
2 changes: 1 addition & 1 deletion src/workerd/io/worker-fs.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ TmpDirStoreScope::TmpDirStoreScope(kj::Maybe<kj::Badge<TmpDirStoreScope>> guard)
: dir(Directory::newWritable()),
// we use the /bundle cwd for the isolate vfs
// and the /tmp cwd for the iocontext vfs
cwd(kj::Path({guard == kj::none ? "bundle" : "tmp"})) {
cwd({"bundle"}) {
if (guard == kj::none) {
kj::requireOnStack(this, "must be created on the stack");
onStack = true;
Expand Down