From 07f830d03bb30340b092eecbd96847d45e5db47c Mon Sep 17 00:00:00 2001 From: Badri Date: Fri, 12 Aug 2022 14:11:15 +0530 Subject: [PATCH] Fix update script: file check Instead of checking for the existence of a file, we were checking if config.production.json was a directory! Obviously, this would end up failing (unless you've done something very strange with your Ghost setup). --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d0cde84..d3ce02f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,7 +92,7 @@ then tmpdir="$(mktemp -d)" # Copy the admin saved settings from final path to tmp directory - if [ -d "$final_path/config.production.json" ] + if [ -f "$final_path/config.production.json" ] then # Old versions of Ghost store it here cp -ar "$final_path/config.production.json" "$tmpdir/config.production.json" @@ -102,7 +102,7 @@ then fi # Backup the content folder to the temp dir - if [ -d "$final_path/config.production.json" ] + if [ -f "$final_path/config.production.json" ] then # Old versions of Ghost store it here cp -ar "$final_path/content" "$tmpdir/content"