diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-14 18:58:37 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-14 18:58:37 +0200 |
| commit | 370f13b58e9cb74eeab3461afb779cf4d013c94b (patch) | |
| tree | b030d70528cd390818254839c1f140a5a575f191 /runner/just/just.go | |
| parent | 4fecdd952c270de8ce6e4cc4e6f3513e5579febe (diff) | |
handle not having stuff installed a little more gracefully
Diffstat (limited to 'runner/just/just.go')
| -rw-r--r-- | runner/just/just.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runner/just/just.go b/runner/just/just.go index e574536..a800212 100644 --- a/runner/just/just.go +++ b/runner/just/just.go @@ -1,6 +1,7 @@ package just import ( + "errors" "io/fs" "os/exec" "pik/identity" @@ -83,9 +84,13 @@ func ParseOutput(input string) []model.Target { return result } +var NoJustError = errors.New("no just in $PATH but source contains justfile") + func (j *just) findJust() error { loc, err := exec.LookPath("just") - if err != nil { + if errors.Is(err, exec.ErrNotFound) { + return NoJustError + } else if err != nil { return err } j.path = loc |
