From 8a467b0d43140f6956d53c27e2319ae1b572868c Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 24 Nov 2021 21:39:03 +0000 Subject: [PATCH] fix(embedding): embedding GCC fails when paths do not require sanitizing It seems homebrew bottle of GCC for macOS Monterey (12.0) have changed their directory structure slightly, which caused an issue were we were trying to rename a specific directory to the same name it already had. This behavior is still required as it looks like GCC on macOS Catalina (10.15), the GCC homebrew bottle still uses the old directory structure. --- build-emacs-for-macos | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-emacs-for-macos b/build-emacs-for-macos index f169039..967d685 100755 --- a/build-emacs-for-macos +++ b/build-emacs-for-macos @@ -966,7 +966,9 @@ class GccLibEmbedder < AbstractEmbedder FileUtils.cp_r(source_dir, target_dir) FileUtils.rm(Dir[File.join(target_dir, '**', '.DS_Store')], force: true) FileUtils.chmod_R('u+w', target_dir) - FileUtils.mv(source_darwin_dir, target_darwin_dir) + if source_darwin_dir != target_darwin_dir + FileUtils.mv(source_darwin_dir, target_darwin_dir) + end env_setup = ERB.new(NATIVE_COMP_ENV_VAR_TPL).result(gcc_info.get_binding) return if File.exist?(site_start_el_file) &&