Skip to content

Commit e05b21f

Browse files
committed
fix linting
1 parent dc95625 commit e05b21f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ restore-secret "Actions Launch token oauth cert" "actions-oauth-s2s-signing-cert
8888
# Restore storage container prefix, but only if the `-c` option is used with ghe-restore to avoid staging instances using production bucket settings
8989
# This value will only be present in backups from versions >= 3.10 so needs to be wrapped in version checks.
9090
if [ -n "$GHE_RESTORE_SNAPSHOT_PATH" ]; then
91-
snapshot_version=$(cat $GHE_RESTORE_SNAPSHOT_PATH/version)
91+
snapshot_version=$(cat "$GHE_RESTORE_SNAPSHOT_PATH/version")
9292
# shellcheck disable=SC2046 # Word splitting is required to populate the variables
93-
read -r snapshot_version_major snapshot_version_minor _ <<<$(ghe_parse_version $snapshot_version)
94-
if [ "$snapshot_version_major" -eq "3" -a "$snapshot_version_minor" -ge "10" -a $RESTORE_SETTINGS ]; then
93+
read -r snapshot_version_major snapshot_version_minor _ <<<$(ghe_parse_version "$snapshot_version")
94+
if [[ "$snapshot_version_major" -eq "3" && "$snapshot_version_minor" -ge "10" && $RESTORE_SETTINGS ]]; then
9595
restore-secret "Actions storage container prefix" "actions-storage-container-prefix" "secrets.actions.storage.container-prefix"
9696
fi
9797
fi

0 commit comments

Comments
 (0)