зеркало из https://github.com/microsoft/shelljs.git
old makerjs --> shelljs
This commit is contained in:
Родитель
42335307b9
Коммит
5f15f49515
6
shell.js
6
shell.js
|
@ -1154,7 +1154,7 @@ var PERMS = (function (base) {
|
|||
//@
|
||||
//@ ```javascript
|
||||
//@ chmod(755, '/Users/brandon');
|
||||
//@ chmod('755', '/Users/brandon'); // same as above
|
||||
//@ chmod('755', '/Users/brandon'); // same as above
|
||||
//@ chmod('u+x', '/Users/brandon');
|
||||
//@ ```
|
||||
//@
|
||||
|
@ -1637,7 +1637,7 @@ function mkdirSyncRecursive(dir) {
|
|||
fs.mkdirSync(dir, parseInt('0777', 8));
|
||||
}
|
||||
|
||||
// e.g. 'makerjs_a5f185d0443ca...'
|
||||
// e.g. 'shelljs_a5f185d0443ca...'
|
||||
function randomFileName() {
|
||||
function randomHash(count) {
|
||||
if (count === 1)
|
||||
|
@ -1650,7 +1650,7 @@ function randomFileName() {
|
|||
}
|
||||
}
|
||||
|
||||
return 'makerjs_'+randomHash(20);
|
||||
return 'shelljs_'+randomHash(20);
|
||||
}
|
||||
|
||||
// Returns false if 'dir' is not a writeable directory, 'dir' otherwise
|
||||
|
|
|
@ -13,7 +13,7 @@ shell.mkdir('tmp');
|
|||
|
||||
assert.equal(shell.env['PATH'], process.env['PATH']);
|
||||
|
||||
shell.env['MAKERJS_TEST'] = 'hello world';
|
||||
assert.equal(shell.env['MAKERJS_TEST'], process.env['MAKERJS_TEST']);
|
||||
shell.env['SHELLJS_TEST'] = 'hello world';
|
||||
assert.equal(shell.env['SHELLJS_TEST'], process.env['SHELLJS_TEST']);
|
||||
|
||||
shell.exit(123);
|
||||
|
|
Загрузка…
Ссылка в новой задаче