Skip to content

Commit 03429e8

Browse files
Merge pull request #11 from codefresh-io/SAAS-6392
Format stderr logs
2 parents b928dba + 24c427c commit 03429e8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 10.0.0
1+
version: 10.0.1

start.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ if [ "$USE_SSH" = "true" ]; then
5353
SSH_HOST=$(echo "$REPO" | cut -d ":" -f 1 | cut -d "@" -f 2)
5454

5555
echo "Adding "$SSH_HOST" to known_hosts"
56-
ssh-keygen -R $SSH_HOST
57-
ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts
56+
57+
# removes all keys belonging to hostname from a known_hosts file
58+
ssh-keygen -R $SSH_HOST 2>/dev/null
59+
# skip stderr logs that start with '#'
60+
ssh-keyscan -H $SSH_HOST > ~/.ssh/known_hosts 2> >(grep -v '^#' >&2)
5861
fi
5962

6063
mkdir -p "$WORKING_DIRECTORY"

0 commit comments

Comments
 (0)