File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,8 @@ def __init__(self, yml_path: str) -> None:
288288 self ._use_default_memory_map : bool = True
289289
290290 try :
291+ # Normalize the path to ensure compatibility across platforms.
292+ yml_path = os .path .normpath (yml_path )
291293 with open (yml_path , 'r' ) as yml_file :
292294 yml_data = yaml .safe_load (yml_file )
293295 if 'cbuild-run' in yml_data :
@@ -296,6 +298,10 @@ def __init__(self, yml_path: str) -> None:
296298 self ._valid = True
297299 else :
298300 raise CbuildRunError (f"Invalid .cbuild-run.yml file '{ yml_path } '" )
301+ # Set cbuild-run path as the current working directory.
302+ base_path = Path (yml_path ).parent
303+ os .chdir (base_path )
304+ LOG .debug ("Working directory set to '%s'" , os .getcwd ())
299305 except IOError as err :
300306 LOG .error ("Error attempting to access .cbuild-run.yml file '%s': %s" , yml_path , err )
301307
You can’t perform that action at this time.
0 commit comments