aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/install_upgrade_escript
diff options
context:
space:
mode:
authorLuis Rascão <[email protected]>2017-11-17 21:20:35 +0000
committerGitHub <[email protected]>2017-11-17 21:20:35 +0000
commita3c7263856236539278a8019fded8f66e36938f7 (patch)
treef03e9b577c54cd748ab68b7864143498a95b9351 /priv/templates/install_upgrade_escript
parentc8e597d300b7f3bc79b7971e955b9b06a90d803b (diff)
parent69dafa2b0a22ca4f266f730342ff3d6b1802767b (diff)
downloadrelx-a3c7263856236539278a8019fded8f66e36938f7.tar.gz
relx-a3c7263856236539278a8019fded8f66e36938f7.tar.bz2
relx-a3c7263856236539278a8019fded8f66e36938f7.zip
Merge pull request #624 from ferd/relup-windows
Fix release upgrades on Windows
Diffstat (limited to 'priv/templates/install_upgrade_escript')
-rw-r--r--priv/templates/install_upgrade_escript9
1 files changed, 7 insertions, 2 deletions
diff --git a/priv/templates/install_upgrade_escript b/priv/templates/install_upgrade_escript
index 47521c6..d704136 100644
--- a/priv/templates/install_upgrade_escript
+++ b/priv/templates/install_upgrade_escript
@@ -207,7 +207,12 @@ find_and_link_release_package(Version, RelName) ->
ok = filelib:ensure_dir(filename:join([filename:dirname(ReleaseLink), "dummy"])),
%% create the symlink pointing to the full path name of the
%% release package we found
- ok = file:make_symlink(filename:absname(Filename), ReleaseLink),
+ case file:make_symlink(filename:absname(Filename), ReleaseLink) of
+ ok ->
+ ok;
+ {error, eperm} -> % windows!
+ {ok,_} = file:copy(filename:absname(Filename), ReleaseLink)
+ end,
{Filename, ReleaseHandlerPackageLink}
end.
@@ -311,7 +316,7 @@ start_distribution(TargetNode, NameTypeArg, Cookie) ->
{true, pong} ->
ok;
{_, pang} ->
- io:format("Node ~p not responding to pings.\n", [TargetNode]),
+ ?INFO("Node ~p not responding to pings.\n", [TargetNode]),
erlang:halt(1)
end,
{ok, Cwd} = file:get_cwd(),