mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 17:01:08 +00:00

This makes the naming more consistent with existing properties like isFreeBSD where the capitalization of the property name is consistent with the conventional styling of the operating system. PR-URL: https://github.com/nodejs/node/pull/14263 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com>
25 lines
769 B
JavaScript
25 lines
769 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
|
|
if (common.isSunOS || common.isWindows || common.isAIX)
|
|
common.skip('cannot rmdir current working directory');
|
|
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const dirname = `${common.tmpDir}/cwd-does-not-exist-${process.pid}`;
|
|
common.refreshTmpDir();
|
|
fs.mkdirSync(dirname);
|
|
process.chdir(dirname);
|
|
fs.rmdirSync(dirname);
|
|
|
|
const proc = spawn(process.execPath, ['-e', '0']);
|
|
proc.stdout.pipe(process.stdout);
|
|
proc.stderr.pipe(process.stderr);
|
|
|
|
proc.once('exit', common.mustCall(function(exitCode, signalCode) {
|
|
assert.strictEqual(exitCode, 0);
|
|
assert.strictEqual(signalCode, null);
|
|
}));
|