FIX: copy local theme changes to correct temp folder when diffing updates to remote theme

FIX: copy local theme changes to correct temp folder when diffing updates to remote theme

Previously, local changes were being copied to a subfolder, resulting in lots of false positive diff changes.

diff --git a/lib/theme_store/git_importer.rb b/lib/theme_store/git_importer.rb
index 673e9a4..cf44169 100644
--- a/lib/theme_store/git_importer.rb
+++ b/lib/theme_store/git_importer.rb
@@ -38,7 +38,7 @@ class ThemeStore::GitImporter
     Dir.chdir(@temp_folder) do
       Discourse::Utils.execute_command("git", "checkout", local_version)
       Discourse::Utils.execute_command("rm -rf ./*/")
-      Discourse::Utils.execute_command("cp", "-rf", "#{local_temp_folder}/#{exporter.export_name}/", @temp_folder)
+      Discourse::Utils.execute_command("cp", "-rf", "#{local_temp_folder}/#{exporter.export_name}/.", @temp_folder)
       Discourse::Utils.execute_command("git", "checkout", "about.json")
       # adding and diffing on staged so that we catch uploads
       Discourse::Utils.execute_command("git", "add", "-A")

GitHub sha: 5cf5e735

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: