diff --git a/node_modules/vfs-local/localfs.js b/node_modules/vfs-local/localfs.js index d1c2a1b6..73987785 100644 --- a/node_modules/vfs-local/localfs.js +++ b/node_modules/vfs-local/localfs.js @@ -1926,10 +1926,18 @@ module.exports = function setup(fsOptions) { function run(err){ if (err) return callback(err); + _setDefaultEnv(options); + delete options.env.TMUX; + + // HACK: workaround for tmux 2.2 bug: + // tmux passes PATH to new sessions breaking rvm + var sep = isWin ? ";" : ":"; + options.env.PATH = options.env.PATH.split(sep).filter(function(p) { + return !/\/rvm\//.test(p); + }).join(sep); + // ENDHACK if (options.detach && options.output) { - _setDefaultEnv(options); - delete options.env.TMUX; return _execFile(TMUX, args, { args: args,