Commit a2b92c5
committed
Abort installation on sudo or command failure in sudo_if_install_dir_not_writeable
The function silently returned non-zero exit codes to callers (wrong
password, missing source file, permission denied, etc.), which allowed
the script to continue in a broken state.
Capturing $? immediately after the command and calling exit preserves
the original exit code and ensures any failure stops the installation
with a clear error message.1 parent 617fbec commit a2b92c5
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
| |||
0 commit comments