Commit a870c93
fix: ensure lesson_count/LESSON_COUNT is always a single integer
Use `$(grep ...) || var=0` assignment pattern so that:
- zero matches (grep exits 1, prints "0"): || branch sets var=0 correctly
- missing file (grep exits 2, prints nothing): || branch sets var=0
- matches found (grep exits 0, prints N): var=N, || branch skipped
This avoids the "0\n0" double-value produced by the old `|| echo 0`
pattern when grep prints "0" and then the fallback also prints "0".
Agent-Logs-Url: https://github.com/TUBAF-IfI-LiaScript/TUBAF-IfI-LiaScript.github.io/sessions/5c24d93a-7262-46db-93d4-c7e22d69854c
Co-authored-by: vgoehler <1705385+vgoehler@users.noreply.github.com>1 parent 6fecc10 commit a870c93
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments