fix: prevent RUNNER detection failure - #1647
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1647 +/- ##
=======================================
Coverage 96.34% 96.34%
=======================================
Files 46 46
Lines 3666 3666
=======================================
Hits 3532 3532
Misses 134 134 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Doesn't this just make it fail later with an arguably more cryptic It would be good to catch this though, maybe something like RUNNER = `command -v docker || command -v podman || true`
_check-runner:
#!/usr/bin/env bash
if [[ "{{ RUNNER }}" == "" ]]; then
echo "No container runtime available - either podman or docker is required"
exit 1
fi
compose <... existing args ...>: _check-runner
...This then fails with |
|
I was thinking of adding a check if git or uv is not available to make it more fool proof but I thought it might be a bit excessive. |
|
We could have a serve: (_require "uv")
...
init-example: (_require "git")
... |
|
just changed uv to uva to give a example output Is this difficult for a software engineer to understand this ? |
Append `|| true` so the justfile can still be parsed/used on systems without a container runtime like docker or podman, instead of erroring out at command substitution time.
83865ac to
d55ed6e
Compare
Append
|| trueso the justfile can still be parsed/used on systems without a container runtime like docker or podman, instead of erroring out at command substitution time.