Skip to content

Commit 020c0cf

Browse files
committed
justfile(fix[watch]): Fix variable expansion in watch tasks
why: Watch tasks failed with "unbound variable" error because ${{ var }} expanded to $find which bash -u treats as undefined variable. what: - Remove $ prefix from {{ var }} in watch-test, watch-ruff, watch-mypy - Fix mypy task: $(${{ py_files }}) → $({{ py_files }})
1 parent 377b1ec commit 020c0cf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

justfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ watch-test:
2828
#!/usr/bin/env bash
2929
set -euo pipefail
3030
if command -v entr > /dev/null; then
31-
${{ py_files }} | entr -c just test
31+
{{ py_files }} | entr -c just test
3232
else
3333
just test
3434
just _entr-warn
@@ -65,7 +65,7 @@ watch-ruff:
6565
#!/usr/bin/env bash
6666
set -euo pipefail
6767
if command -v entr > /dev/null; then
68-
${{ py_files }} | entr -c just ruff
68+
{{ py_files }} | entr -c just ruff
6969
else
7070
just ruff
7171
just _entr-warn
@@ -74,15 +74,15 @@ watch-ruff:
7474
# Run mypy type checker
7575
[group: 'lint']
7676
mypy:
77-
uv run mypy $(${{ py_files }})
77+
uv run mypy $({{ py_files }})
7878

7979
# Watch files and run mypy on change
8080
[group: 'lint']
8181
watch-mypy:
8282
#!/usr/bin/env bash
8383
set -euo pipefail
8484
if command -v entr > /dev/null; then
85-
${{ py_files }} | entr -c just mypy
85+
{{ py_files }} | entr -c just mypy
8686
else
8787
just mypy
8888
just _entr-warn

0 commit comments

Comments
 (0)