-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.snapshotIssues and PRs related to the startup snapshotIssues and PRs related to the startup snapshot
Description
Version
v20.6.1
Platform
Darwin
Subsystem
snapshots
What steps will reproduce the bug?
Generate a snapshot of the given script, then run it from a different directory. The process.cwd()
function will keep returning the cwd you had while building the snapshot.
const v8 = require(`v8`);
if (v8.startupSnapshot.isBuildingSnapshot()) {
v8.startupSnapshot.setDeserializeMainFunction(() => {
console.log(process.cwd());
});
}
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
It should return the actual cwd.
What do you see instead?
It returns the cwd at the time of --build-snapshot
.
Additional information
No response
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.snapshotIssues and PRs related to the startup snapshotIssues and PRs related to the startup snapshot