Skip to content

Commit

Permalink
Fix cwd when git-foreaching
Browse files Browse the repository at this point in the history
  • Loading branch information
janhybs committed Dec 11, 2018
1 parent b229871 commit e2d1922
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cihpc/git_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import sys
import threading
import logging
from cihpc.cfg.config import global_configuration

from flask import Flask, request

Expand Down Expand Up @@ -97,8 +98,8 @@ def run(self):

with Timer(commit.short_format) as timer:
args = self.args_constructor.construct_arguments(commit.hash)
logger.info(str(args))
process = subprocess.Popen(args)
logger.info(' '.join([str(x) for x in args]))
process = subprocess.Popen(args, cwd=global_configuration.cwd)
process.wait()

logger.info('%s took %s [%d]' % (commit.short_format, timer.pretty_duration, process.returncode))
Expand Down

0 comments on commit e2d1922

Please sign in to comment.