Problem
Binding targets define where code lives (package_root) but not the execution environment. There's no way to test code under different working directories or environment variables through a spec case.
Use case
A tool that resolves paths relative to cwd needs testing from multiple directories. Currently requires hand-written tests outside the spec system.
Proposed design
Add optional fields to binding targets:
\\yaml
targets:
default:
package_root: ../my-tool
from_temp_dir:
package_root: ../my-tool
cwd: /tmp
with_config:
package_root: ../my-tool
env:
CONFIG_PATH: /etc/myapp
LOG_LEVEL: debug
\\
The harness passes these to the generated runner via \Command::current_dir()\ and \Command::env().
Similar to VS Code tasks.json fields (cwd, env, shell).
Problem
Binding targets define where code lives (package_root) but not the execution environment. There's no way to test code under different working directories or environment variables through a spec case.
Use case
A tool that resolves paths relative to cwd needs testing from multiple directories. Currently requires hand-written tests outside the spec system.
Proposed design
Add optional fields to binding targets:
\\yaml
targets:
default:
package_root: ../my-tool
from_temp_dir:
package_root: ../my-tool
cwd: /tmp
with_config:
package_root: ../my-tool
env:
CONFIG_PATH: /etc/myapp
LOG_LEVEL: debug
\\
The harness passes these to the generated runner via \Command::current_dir()\ and \Command::env().
Similar to VS Code tasks.json fields (cwd, env, shell).