Repository navigation
Commit 15901c1
committed
fix(release): resolve lazily, and do not swallow the not-found message
Resolving at load time made the interpreter a hard requirement for every
invocation, including the ones that never run Python. On a machine with
python3 3.9 and no uv, `--help` died with the interpreter error instead of
printing usage -- so the message telling you which interpreter you need was
itself gated on having it, on exactly the machine the resolution exists for.
Now resolved as the first line of cmd_prepare and cmd_publish, with an empty
default for set -u.
And `$(python3 -V 2>&1 || echo absent)` captured the shell's own
"command not found" into the message before appending "absent", so the
no-python3-at-all case printed both. Guarded on command -v.
Verified: --help prints usage with PATH=/usr/bin:/bin; prepare/publish still
refuse with `python3 is Python 3.9.6`; and with python3 entirely absent the
message is `python3 is absent`.1 parent f6fb736 commit 15901c1
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| 127 | + | |
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
| |||
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
0 commit comments