From d108e9b03d3e01faa5dc05a0698ccb63447d1f04 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 26 Oct 2018 14:11:39 +0300 Subject: [PATCH] dvc: don't use $SHELL on windows Related to #1238 Signed-off-by: Ruslan Kuprieiev --- dvc/remote/hdfs.py | 3 ++- dvc/stage.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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)