Skip to content

Commit a974b0c

Browse files
committed
Fix SSH_HOSTS environment variable to actually work
This is fix provided in the following PR: debitoor#9
1 parent e7880b1 commit a974b0c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/compile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ function indent() {
1010

1111
ENV_DIR=${3:-}
1212
ssh_key="$(cat $ENV_DIR/SSH_KEY)"
13-
ssh_hosts=${SSH_HOSTS:-"git@github.com"}
13+
if [ -f $ENV_DIR/SSH_HOSTS ]; then
14+
ssh_hosts="$(cat $ENV_DIR/SSH_HOSTS)"
15+
echo "Available ssh hosts passed via SSH_HOSTS variable: $ssh_hosts"
16+
else
17+
ssh_hosts="git@github.com"
18+
echo "SSH_HOSTS is not set, using default git@github.com"
19+
fi
1420

1521
if [ "$ssh_key" != "" ]; then
1622
echo "-----> Running SSH private key setup"

0 commit comments

Comments
 (0)