We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff074ff commit 36bd4d3Copy full SHA for 36bd4d3
1 file changed
9pm.py
@@ -687,14 +687,16 @@ def setup_env(args):
687
os.environ["NINEPM_CONFIG"] = args.config
688
689
def run_git_cmd(path, command):
690
- if not os.path.isdir(os.path.join(path, '.git')):
+ gitdir = os.path.join(path, '.git')
691
+
692
+ if not os.path.isdir(gitdir):
693
vcprint(pcolor.orange, f"warning, no .git dir in path ({path})")
694
return ""
695
696
try:
- vcprint(pcolor.faint, f"Running: git -C {path} {command}")
697
+ vcprint(pcolor.faint, f"Running: git --git-dir {gitdir} {command}")
698
result = subprocess.check_output(
- ['git', '-C', path] + command,
699
+ ['git', '--git-dir', gitdir] + command,
700
stderr=subprocess.STDOUT
701
).decode('utf-8').strip()
702
except Exception as e:
0 commit comments