How to use the chdir function from process
Find comprehensive JavaScript process.chdir code examples handpicked from public code repositorys.
GitHub: ZhangGe6/onnx-modifier
23 24 25 26 27 28 29 30 31 32
return; } electron.app.on('second-instance', (event, commandLine, workingDirectory) => { const currentDirectory = process.cwd(); process.chdir(workingDirectory); const open = this._parseCommandLine(commandLine); process.chdir(currentDirectory); if (!open) { if (this._views.count > 0) {
91
622
10
+ 3 other calls in file
28 29 30 31 32 33 34 35 36 37
return } const oldDir = process.cwd() if (fsr.fileExists(params.html.sourcePath)) { process.chdir(params.html.sourcePath) } // generate html source/output directories fsr.ensureDirSync(htmlPath)
35
68
0
GitHub: Koromix/rygel
52 53 54 55 56 57 58 59 60 61 62 63
async function main() { script_dir = fs.realpathSync(__dirname); root_dir = fs.realpathSync(script_dir + '/../../..'); // All the code assumes we are working from the script directory process.chdir(script_dir); let command = test; let patterns = [];
7
35
0
GitHub: CodingItWrong/jessup
6 7 8 9 10 11 12 13 14 15 16 17 18
function cd(path) { console.log(`$ cd ${path}`); if (!DRY_RUN) { chdir(path); } } function mkdir(path) {
2
3
0
10 11 12 13 14 15 16 17 18 19 20 21 22 23
res.status(200).json({'branches': [branches]}); }); const getBranches = () => { process.chdir('../../bizom-next'); const branches = command.execSync('git branch').toString().split('\n'); let remoteBranches = [];
0
0
1
148 149 150 151 152 153 154 155 156 157
); } console.log("[devtools-node-test-runner] Found test suite: " + suite); const testPath = path.join(__dirname, SUITES[suite].path); chdir(testPath); console.log("[devtools-node-test-runner] Check `yarn` is available"); try { // This will throw if yarn is unavailable
0
0
0
8 9 10 11 12 13 14 15 16 17 18
console.log('current working directory: ', process.cwd()) try { // Change the directory process.chdir('./data'); console.log('directory changed to: ', process.cwd()) } catch (err) { // Printing error if occurs
0
0
0
process.exit is the most popular function in process (513 examples)