| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -331,16 +331,25 @@ def execute(self, command, | |||
| 331 | 331 | else: | |
| 332 | 332 | cwd=self._working_dir | |
| 333 | 333 | ||
| 334 | - if command[1] == 'pull' or command[1] == 'reset': | ||
| 335 | - cwd += '/.git' | ||
| 336 | - | ||
| 334 | + import logging | ||
| 335 | + log = logging.getLogger(u"cratejoy") | ||
| 336 | + log.debug(u"Running command {} in {}".format(command, cwd)) | ||
| 337 | + | ||
| 338 | + env = os.environ.copy() | ||
| 339 | + if env.get('GIT_DIR'): | ||
| 340 | + del env['GIT_DIR'] | ||
| 341 | + | ||
| 342 | + #log.debug(env) | ||
| 343 | + #log.debug(u"Args {}".format(subprocess_kwargs)) | ||
| 344 | + | ||
| 337 | 345 | # Start the process | |
| 338 | 346 | proc = Popen(command, | |
| 339 | 347 | cwd=cwd, | |
| 340 | 348 | stdin=istream, | |
| 341 | 349 | stderr=PIPE, | |
| 342 | 350 | stdout=PIPE, | |
| 343 | 351 | close_fds=(os.name=='posix'),# unsupported on linux | |
| 352 | + env=env, | ||
| 344 | 353 | **subprocess_kwargs | |
| 345 | 354 | ) | |
| 346 | 355 | if as_process: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments