Commit dc80581
committed
fix(scripts): preserve optional-repo semantic on wkhtmltopdf-openemr
Rabbit-flagged regression in this PR. The previous code at
startFarm.sh:68 and restartFarm.sh:32 had a comment marking
`wkhtmltopdf-openemr` as optional. The unguarded `cd ~/...`
silently failed when the directory was absent, so the subsequent
`git pull` failed too -- but the script kept going. That silent
failure WAS the "skip if absent" semantic.
Adding `|| exit 1` (the SC2164 fix) turned the documented-optional
repo into a hard requirement: a fresh host without the
wkhtmltopdf checkout would exit before starting any docker
containers.
The build-tests suite (openemr#147/openemr#148) only covers demo_build.sh, so
this regression wouldn't surface in CI -- the docker/scripts/*
orchestration scripts run on the production EC2 host and were
explicitly out-of-scope when openemr#146 was planned. Rabbit's review
was the only layer that caught this.
Fix: wrap both sites with `if [ -d ~/wkhtmltopdf-openemr ]`
guards. Keeps the cd-failure-is-fatal semantic (so a stale dir
without git history still exits loudly), but skips the block
entirely when the optional repo isn't there.
Refs: openemr#146 (issue), openemr#150 (this PR)
Assisted-by: Claude Code1 parent 4611ac3 commit dc80581
2 files changed
Lines changed: 20 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
0 commit comments