-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathshelljs+0.8.4.patch
93 lines (83 loc) · 2.63 KB
/
shelljs+0.8.4.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
diff --git a/node_modules/shelljs/shell.js b/node_modules/shelljs/shell.js
index f9c6f36..64061b9 100644
--- a/node_modules/shelljs/shell.js
+++ b/node_modules/shelljs/shell.js
@@ -21,15 +21,38 @@ var common = require('./src/common');
//@commands
// Load all default commands
-require('./commands').forEach(function (command) {
- require('./src/' + command);
-});
+require('./src/cat');
+require('./src/cd');
+require('./src/chmod');
+require('./src/cp');
+require('./src/dirs');
+require('./src/echo');
+require('./src/exec');
+require('./src/find');
+require('./src/grep');
+require('./src/head');
+require('./src/ln');
+require('./src/ls');
+require('./src/mkdir');
+require('./src/mv');
+require('./src/pwd');
+require('./src/rm');
+require('./src/sed');
+require('./src/set');
+require('./src/sort');
+require('./src/tail');
+require('./src/tempdir');
+require('./src/test');
+require('./src/to');
+require('./src/toEnd');
+require('./src/touch');
+require('./src/uniq');
+require('./src/which');
//@
//@ ### exit(code)
//@
//@ Exits the current process with the given exit `code`.
-exports.exit = process.exit;
//@include ./src/error
exports.error = require('./src/error');
@@ -42,7 +65,6 @@ exports.ShellString = common.ShellString;
//@
//@ Object containing environment variables (both getter and setter). Shortcut
//@ to `process.env`.
-exports.env = process.env;
//@
//@ ### Pipes
diff --git a/node_modules/shelljs/src/common.js b/node_modules/shelljs/src/common.js
index 64fa2fb..3fce330 100644
--- a/node_modules/shelljs/src/common.js
+++ b/node_modules/shelljs/src/common.js
@@ -12,7 +12,7 @@ var shellMethods = Object.create(shell);
exports.extend = Object.assign;
// Check if we're running under electron
-var isElectron = Boolean(process.versions.electron);
+var isElectron = true
// Module globals (assume no execPath by default)
var DEFAULT_CONFIG = {
@@ -50,7 +50,6 @@ var state = {
};
exports.state = state;
-delete process.env.OLDPWD; // initially, there's no previous directory
// Reliably test if something is any sort of javascript object
function isObject(a) {
@@ -252,13 +251,9 @@ exports.expand = expand;
// Normalizes Buffer creation, using Buffer.alloc if possible.
// Also provides a good default buffer length for most use cases.
-var buffer = typeof Buffer.alloc === 'function' ?
- function (len) {
- return Buffer.alloc(len || config.bufLength);
- } :
- function (len) {
- return new Buffer(len || config.bufLength);
- };
+var buffer = function (len) {
+ return Buffer.alloc(len || config.bufLength);
+};
exports.buffer = buffer;
// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e.