Skip to content

Commit d5efdfc

Browse files
committed
Don't try to import license file on earlier fs layouts
1 parent 5c791fc commit d5efdfc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

bin/ghe-restore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ if [ "$GHE_VERSION_MAJOR" -gt 1 ] && [ "$GHE_REMOTE_DATA_DIR" = /data ]; then
5959
export GHE_REMOTE_METADATA_FILE=/data/enterprise/chef_metadata.json
6060
fi
6161

62-
if ! ghe-ssh "$host" -- "test -f $GHE_REMOTE_LICENSE_FILE"; then
62+
# Restore license file under versions >= 2.x. This is for automated restores of
63+
# newly provisioned VMs in internal GitHub test environments only currently.
64+
if [ "$GHE_VERSION_MAJOR" -gt 1 ] && ! ghe-ssh "$host" "test -f '$GHE_REMOTE_LICENSE_FILE'"; then
6365
echo "Restoring license ..."
6466
ghe-ssh "$host" -- 'ghe-import-license' < "$GHE_RESTORE_SNAPSHOT_PATH/enterprise.ghl" 1>&3
6567
fi

0 commit comments

Comments
 (0)