Skip to content

Commit 849cbca

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-docs, watch-ruff, watch-mypy - Fix mypy task: $(${{ py_files }}) → $({{ py_files }})
1 parent ec7de45 commit 849cbca

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

justfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ watch-test:
2929
#!/usr/bin/env bash
3030
set -euo pipefail
3131
if command -v entr > /dev/null; then
32-
${{ all_files }} | entr -c just test
32+
{{ all_files }} | entr -c just test
3333
else
3434
just test
3535
just _entr-warn
@@ -46,7 +46,7 @@ watch-docs:
4646
#!/usr/bin/env bash
4747
set -euo pipefail
4848
if command -v entr > /dev/null; then
49-
${{ doc_files }} | entr -c just build-docs
49+
{{ doc_files }} | entr -c just build-docs
5050
else
5151
just build-docs
5252
just _entr-warn
@@ -91,7 +91,7 @@ watch-ruff:
9191
#!/usr/bin/env bash
9292
set -euo pipefail
9393
if command -v entr > /dev/null; then
94-
${{ py_files }} | entr -c just ruff
94+
{{ py_files }} | entr -c just ruff
9595
else
9696
just ruff
9797
just _entr-warn
@@ -100,15 +100,15 @@ watch-ruff:
100100
# Run mypy type checker
101101
[group: 'lint']
102102
mypy:
103-
uv run mypy $(${{ py_files }})
103+
uv run mypy $({{ py_files }})
104104

105105
# Watch files and run mypy on change
106106
[group: 'lint']
107107
watch-mypy:
108108
#!/usr/bin/env bash
109109
set -euo pipefail
110110
if command -v entr > /dev/null; then
111-
${{ py_files }} | entr -c just mypy
111+
{{ py_files }} | entr -c just mypy
112112
else
113113
just mypy
114114
just _entr-warn

0 commit comments

Comments
 (0)