process.chdir(directory)
Changes the current working directory of the process or throws an exception if that fails.
console.log(`Starting directory: ${process.cwd()}`);
try {
process.chdir('/tmp');
console.log(`New directory: ${process.cwd()}`);
}
catch (err) {
console.log(`chdir: ${err}`);
}
Please login to continue.