Skip to content

Commit ad23aec

Browse files
update logic to check if '-c' is set first
Co-authored-by: boxofyellow <[email protected]>
1 parent 4df4edf commit ad23aec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

share/github-backup-utils/ghe-restore-actions

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ restore-secret "Actions Launch token oauth key" "actions-oauth-s2s-signing-key"
8686
restore-secret "Actions Launch token oauth cert" "actions-oauth-s2s-signing-cert" "secrets.launch.token-oauth-cert"
8787

8888
# Restore storage container prefix, but only if it exists, and the `-c` option is used with ghe-restore to avoid staging instances using production bucket settings
89-
if [[ -e "$GHE_RESTORE_SNAPSHOT_PATH/actions-storage-container-prefix" ]]; then
90-
if [[ $RESTORE_SETTINGS == "true" ]]; then
89+
if [[ $RESTORE_SETTINGS == "true" ]]; then
90+
if [[ -e "$GHE_RESTORE_SNAPSHOT_PATH/actions-storage-container-prefix" ]]; then
9191
restore-secret "Actions storage container prefix" "actions-storage-container-prefix" "secrets.actions.storage.container-prefix"
92+
else
93+
log_warn "Actions storage container prefix not present in backup. Skipping ..."
9294
fi
93-
else
94-
log_warn "Actions storage container prefix not present in backup. Skipping ..."
9595
fi
9696

9797
# Setup the database logins.

0 commit comments

Comments
 (0)