From c059be9ba9080aaaf54ce68f7221ba257d46c181 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 3 Jul 2016 21:10:19 +0000 Subject: [PATCH] workaround for tmux 2 bug --- node_modules/vfs-local/localfs.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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,