Skip to content

Commit 061b0cc

Browse files
Copilotyeshan333
andcommitted
Improve MacOS prebuilt file organization logic
Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com>
1 parent 1c72875 commit 061b0cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

hooks/post_install.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ function PLUGIN:PostInstall(ctx)
3232
if RUNTIME.osType == "darwin" then
3333
-- For MacOS prebuilts from @erlef/otp_builds, the tarball contains a ready-to-use installation
3434
-- We need to move the contents to a 'release' subdirectory to match expected structure
35-
local move_cmd = "cd " .. install_path .. " && mkdir -p release && mv * release/ 2>/dev/null || true"
36-
local status = os.execute(move_cmd)
35+
local setup_cmd = "cd " .. install_path .. " && mkdir -p release && for item in *; do if [ \"$item\" != \"release\" ]; then mv \"$item\" release/; fi; done 2>/dev/null || true"
36+
local status = os.execute(setup_cmd)
3737
if status ~= 0 then
3838
error("Erlang/OTP install failed during file organization, please check the stdout for details.")
3939
end

0 commit comments

Comments
 (0)