File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -687,14 +687,16 @@ def setup_env(args):
687687 os .environ ["NINEPM_CONFIG" ] = args .config
688688
689689def run_git_cmd (path , command ):
690- if not os .path .isdir (os .path .join (path , '.git' )):
690+ gitdir = os .path .join (path , '.git' )
691+
692+ if not os .path .isdir (gitdir ):
691693 vcprint (pcolor .orange , f"warning, no .git dir in path ({ path } )" )
692694 return ""
693695
694696 try :
695- vcprint (pcolor .faint , f"Running: git -C { path } { command } " )
697+ vcprint (pcolor .faint , f"Running: git --git-dir { gitdir } { command } " )
696698 result = subprocess .check_output (
697- ['git' , '-C ' , path ] + command ,
699+ ['git' , '--git-dir ' , gitdir ] + command ,
698700 stderr = subprocess .STDOUT
699701 ).decode ('utf-8' ).strip ()
700702 except Exception as e :
You can’t perform that action at this time.
0 commit comments