fix(update): fail fast when install target directory cannot be created
The self-update shell script ran mkdir -p $BIN_DIR without checking the result, so a silently failed directory creation led to the empty path error later in the install step. Make the script stop as soon as mkdir fails and print the directory name in the message.
This commit is contained in:
1 file changed
+1
-1
@@ -553,7 +553,7 @@ QString UpdateManager::stagedInstallScript() {
|
||||
" cp \"$1\" \"$TMP\"\n"
|
||||
" mv -f \"$TMP\" \"$2\"\n"
|
||||
"}\n"
|
||||
"mkdir -p \"$BIN_DIR\"\n"
|
||||
"mkdir -p \"$BIN_DIR\" || { echo 'Impossible de créer '$BIN_DIR; exit 1; }\n"
|
||||
"install_file \"$STAGE/bin/PacManager\" \"$BIN_DIR/PacManager\"\n"
|
||||
// The version marker has to follow the installed release: it is what
|
||||
// the app reports and what the next update check compares against, so
|
||||
|
||||
Reference in new issue
Block a user