Skip to content

Commit 8b56e12

Browse files
committed
ensure which calls in interfaces/base are correct
1 parent a984f9f commit 8b56e12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/interfaces/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ def version_from_command(self, flag='-v', cmd=None):
16051605
if cmd is None:
16061606
cmd = self.cmd.split()[0]
16071607
env = dict(os.environ)
1608-
if which(cmd, env):
1608+
if which(cmd, env=env):
16091609
out_environ = self._get_environ()
16101610
env.update(out_environ)
16111611
proc = sp.Popen(' '.join((cmd, flag)),
@@ -1640,7 +1640,7 @@ def _run_interface(self, runtime, correct_return_codes=(0,)):
16401640

16411641
# which $cmd
16421642
executable_name = self.cmd.split()[0]
1643-
cmd_path = which(executable_name, runtime.environ)
1643+
cmd_path = which(executable_name, env=runtime.environ)
16441644

16451645
if cmd_path is None:
16461646
raise IOError(

0 commit comments

Comments
 (0)