42 ms·
Can you pass extra args to a Just command? Lacking a good way to do this was the #1 reason I moved off of Make: make test-foo TESTOPTS='-a -b -c' Yuck. My
by nerdponx 3y ago
Can you pass extra args to a Just command?
Lacking a good way to do this was the #1 reason I moved off of Make:
make test-foo TESTOPTS='-a -b -c'
Yuck.
My team now just adds a "run" script to all of our projects and it works well enough, no extra dependencies and no fussing around with the unfamiliarity of Make macros. Simple example of how this looks:
#!/usr/bin/env bash
set -eu
venv=.venv
test-coverage() {
"${venv}"/bin/pytest --cov=src
}
coverage-report() {
"${venv}"/bin/coverage combine || true
"${venv}"/bin/coverage report
}
_run() {
source "${venv}"/bin/activate
"$@"
}
_run "$@"