Commit 4830e1c
committed
fix(env): mkdir the envFile's parent dir and throw on upload failure
For nested envFile paths (e.g. apps/backend/.env.production in a
monorepo workspace) \`mkdir -p \${appPath}/shared\` isn't enough — the
\`echo|base64 -d > \${sharedEnv}\` redirect silently fails because the
parent directory doesn't exist. The CLI still printed "Uploaded to
..." because executor.exec doesn't check exit codes, and the symlink
was created pointing at a non-existent file, causing the next deploy
to break with an obscure ./.env sourcing error.
Switch to execOrThrow on each step and mkdir the actual parent of
sharedEnv via dirname.1 parent 44f86fe commit 4830e1c
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
0 commit comments