Skip to content

Commit d25239b

Browse files
committed
fix(spawnify) _onCD: this -> self
1 parent 56d3c66 commit d25239b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/spawnify.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216

217217
Spawnify.prototype._onCD = function onCD(command, currDir) {
218218
var wasError, strs,
219+
self = this,
219220
CD = 'cd ',
220221
HOME = process.env.HOME,
221222

@@ -275,7 +276,7 @@
275276
}
276277

277278
if (!isWildCard)
278-
this._set('exec', command, {cwd: paramDir});
279+
self._set('exec', command, {cwd: paramDir});
279280
else
280281
find(paramDir, function(error, dirs) {
281282
var dir;
@@ -284,7 +285,7 @@
284285
dir = dirs[0];
285286

286287
paramDir = dir;
287-
this._set('exec', command, {cwd: dir});
288+
self._set('exec', command, {cwd: dir});
288289
});
289290
};
290291

0 commit comments

Comments
 (0)