-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added, until erlware/relx#809 is accepted.
- Loading branch information
1 parent
5a6757c
commit 246e1e8
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- us_web-source 2020-08-11 21:51:04.724167964 +0200 | ||
+++ us_web.target 2020-08-11 21:56:14.507137897 +0200 | ||
@@ -647,17 +647,19 @@ | ||
|
||
# Extract the target cookie | ||
# Do this before relx_get_nodename so we can use it and not create a ~/.erlang.cookie | ||
-COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)" | ||
-DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie" | ||
-if [ -z "$COOKIE_ARG" ]; then | ||
- if [ -f "$DEFAULT_COOKIE_FILE" ]; then | ||
- COOKIE="$(cat "$DEFAULT_COOKIE_FILE")" | ||
+if [ -z "$COOKIE" ]; then | ||
+ COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)" | ||
+ DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie" | ||
+ if [ -z "$COOKIE_ARG" ]; then | ||
+ if [ -f "$DEFAULT_COOKIE_FILE" ]; then | ||
+ COOKIE="$(cat "$DEFAULT_COOKIE_FILE")" | ||
+ else | ||
+ echo "No cookie is set or found. This limits the scripts functionality, installing, upgrading, rpc and getting a list of versions will not work." | ||
+ fi | ||
else | ||
- echo "No cookie is set or found. This limits the scripts functionality, installing, upgrading, rpc and getting a list of versions will not work." | ||
+ # Extract cookie name from COOKIE_ARG | ||
+ COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')" | ||
fi | ||
-else | ||
- # Extract cookie name from COOKIE_ARG | ||
- COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')" | ||
fi | ||
|
||
# User can specify an sname without @hostname |