Skip to content

Commit

Permalink
Merge pull request iterative#1198 from efiop/master
Browse files Browse the repository at this point in the history
hdfs: don't use close_fds on Windows
  • Loading branch information
efiop authored Oct 9, 2018
2 parents a4f9789 + 971f325 commit bc93cc0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dvc/remote/hdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ def hadoop_fs(self, cmd, user=None):
cmd = 'hadoop fs -' + cmd
if user:
cmd = 'HADOOP_USER_NAME={} '.format(user) + cmd

# NOTE: close_fds doesn't work with redirected stdin/stdout/stderr.
# See https://github.com/iterative/dvc/issues/1197.
close_fds = (os.name != 'nt')

p = Popen(cmd,
shell=True,
close_fds=True,
close_fds=close_fds,
executable=os.getenv('SHELL'),
env=fix_env(os.environ),
stdin=PIPE,
Expand Down

0 comments on commit bc93cc0

Please sign in to comment.