Skip to content

Commit

Permalink
Pass GIT_FLUSH via the env argument instead of command
Browse files Browse the repository at this point in the history
Fixes compatibility with cmd.exe
Refs #62
  • Loading branch information
Kentzo committed Nov 13, 2018
1 parent b57d7b2 commit 4910383
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions git_archive_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from __future__ import unicode_literals

import logging
from os import extsep, path, readlink
from os import environ, extsep, path, readlink
from subprocess import CalledProcessError, Popen, PIPE
import sys
import re
Expand Down Expand Up @@ -356,8 +356,9 @@ def check_attr(cls, repo_abspath, attrs):
@rtype: generator
"""
def make_process():
cmd = 'GIT_FLUSH=1 git check-attr --stdin -z {0}'.format(' '.join(attrs))
return Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, cwd=repo_abspath)
env = dict(environ, GIT_FLUSH='1')
cmd = 'git check-attr --stdin -z {0}'.format(' '.join(attrs))
return Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, cwd=repo_abspath, env=env)

def read_attrs(process, repo_file_path):
process.stdin.write(repo_file_path.encode('utf-8') + b'\0')
Expand Down

0 comments on commit 4910383

Please sign in to comment.