Skip to content

Commit

Permalink
Fix cwd method of process for browser (close #718)
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Sep 7, 2023
1 parent 31b813f commit f2f590f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/embed/polyfills/node_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ if (typeof Deno !== "undefined") {
},
});
process.argv = argv;
} else {
let cwd = "/";
process.cwd = () => cwd;
process.chdir = (d) => cwd = d;
}

export default process;

0 comments on commit f2f590f

Please sign in to comment.