diff --git a/dvc/remote/hdfs.py b/dvc/remote/hdfs.py index ffff79719..5be1ee37a 100644 --- a/dvc/remote/hdfs.py +++ b/dvc/remote/hdfs.py @@ -34,10 +34,11 @@ class RemoteHDFS(RemoteBase): # See https://github.com/iterative/dvc/issues/1197. close_fds = (os.name != 'nt') + executable = os.getenv('SHELL') if os.name != 'nt' else None p = Popen(cmd, shell=True, close_fds=close_fds, - executable=os.getenv('SHELL'), + executable=executable, env=fix_env(os.environ), stdin=PIPE, stdout=PIPE, diff --git a/dvc/stage.py b/dvc/stage.py index ff2dacde0..a0e471ca4 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -440,11 +440,12 @@ class Stage(object): if not dry: self._check_missing_deps() + executable = os.getenv('SHELL') if os.name != 'nt' else None p = subprocess.Popen(self.cmd, cwd=self.cwd, shell=True, env=fix_env(os.environ), - executable=os.getenv('SHELL')) + executable=executable) p.communicate() if p.returncode != 0: raise StageCmdFailedError(self)