Commit a06a5c5
authored
fix: skip postinstall/prepare scripts when installed as npm package (#3)
The postinstall and prepare hooks reference scripts in scripts/ which
are not included in the published npm package (files: ['dist/'] only).
This caused 'npm install -g @hyperlight-dev/hyperagent' to fail with
MODULE_NOT_FOUND.
Use '[ ! -f script ] || command' pattern so hooks skip gracefully when
scripts don't exist (published package) but still fail loudly when they
do exist and error (dev context).
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>1 parent 4041e33 commit a06a5c5
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments