Bug summary
The _append_dirs_to_commands function does not add the paths in quotes, meaning that if a path contains a space the generated shell script will fail. Unfortunately escaping with a \ also fails since relative_path_to_current_platform() replaces all backslashes.
Minimal example:
result = DbtCoreOperation(
commands=[
"dbt debug"
],
project_dir=os.getenv("DBT_PROJECT_DIR", "/local user name with spaces/my_dbt_project")
).run()
Version info
Additional context
No response