Describe the bug
The working directory seems to be the directory where the script can be found. I have a script in ./scripts i.e. where I write all my custom project scripts, but I am wanting its working directory to be ./migrations as it will alway output here.
To Reproduce
Steps to reproduce the behavior:
- Place a script in ./scripts e.g. migrate.sh with content
#!/bin/bash
set -xe
echo "migration content" > up.sql
- Add a line into the command section of the toml file e.g.
[commands]
add-migration = { cmd = "./scripts/add-migration.sh $name", args = ["name"], working_dir = "./migrations" }
- Invoke the command
cargo cmd add-migration name=xxx
- See error
./scripts/add-migration.sh: No such file or directory
Describe the bug
The working directory seems to be the directory where the script can be found. I have a script in
./scriptsi.e. where I write all my custom project scripts, but I am wanting its working directory to be./migrationsas it will alway output here.To Reproduce
Steps to reproduce the behavior:
cargo cmd add-migration name=xxx./scripts/add-migration.sh: No such file or directory