Fixes a bug source_cmd introduced when 'ehco off' was added to the source command.

This commit is contained in:
Morten Enemark Lund 2016-04-20 22:16:33 +02:00
parent c3b94e5265
commit 50cf1d983b

View file

@ -254,7 +254,8 @@ def source_cmd(args, stdin=None):
args[0] = fpath if fpath else args[0]
if not os.path.isfile(args[0]):
raise FileNotFoundError(args[0])
prevcmd = 'call "{}"\necho off'.format(args[0])
prevcmd = 'call "{}"'.format('" "'.join(args))
prevcmd += '\necho off'
args.append('--prevcmd={}'.format(prevcmd))
args.insert(0, 'cmd')
args.append('--interactive=0')