File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 2121from pathlib import Path
2222from typing import Tuple
2323
24- from scripts .shared import execute_subprocess
24+ # Import execute_subprocess function from scripts.shared
25+ root = str (Path (__file__ ).resolve ().parent .parent )
26+ old_path = sys .path .copy ()
27+ sys .path .insert (0 , root )
28+ try :
29+ from scripts .shared import execute_subprocess
30+ finally :
31+ # Restore original sys.path
32+ sys .path = old_path
2533
2634NAME = "GeoCat Bridge"
2735DEFAULT_DIR = "../build/docs"
@@ -313,7 +321,7 @@ def main():
313321 sep = '\n \t '
314322 print (f"Python paths:{ sep } { f'{ sep } ' .join (sys .path )} " )
315323 finally :
316- if not result and not gh_ref and current and not has_edits :
324+ if result == 0 and not gh_ref and current and not has_edits :
317325 # Restore Git repo if there were no errors, the script was not triggered by a GitHub Action,
318326 # the name of the working branch could be determined and the original working branch was clean.
319327 print (f"Restoring initially checked out '{ current } ' branch..." )
You can’t perform that action at this time.
0 commit comments