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:
288
288
self ._use_default_memory_map : bool = True
289
289
290
290
try :
291
+ # Normalize the path to ensure compatibility across platforms.
292
+ yml_path = os .path .normpath (yml_path )
291
293
with open (yml_path , 'r' ) as yml_file :
292
294
yml_data = yaml .safe_load (yml_file )
293
295
if 'cbuild-run' in yml_data :
@@ -296,6 +298,10 @@ def __init__(self, yml_path: str) -> None:
296
298
self ._valid = True
297
299
else :
298
300
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 ())
299
305
except IOError as err :
300
306
LOG .error ("Error attempting to access .cbuild-run.yml file '%s': %s" , yml_path , err )
301
307
You can’t perform that action at this time.
0 commit comments