Skip to content

Commit e9faf64

Browse files
authored
Merge branch 'master' into bevns/ghe-detect-leaked-ssh-keys
2 parents 450573d + 83a022c commit e9faf64

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

share/github-backup-utils/ghe-detect-leaked-ssh-keys

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [ -n "$ppid_script" ]; then
4040
fi
4141

4242
sshkeygen_multiple_hash_formats=false
43-
if (ssh-keygen --a-dedicated-help-flag-would-be-great 2>&1 | grep 'ssh-keygen -l ' | grep -q -- '-E'); then
43+
if (ssh-keygen -E 2>&1 | head -1 | grep -q 'option requires an argument'); then
4444
sshkeygen_multiple_hash_formats=true
4545
fi
4646

test/test-ghe-backup-config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ begin_test "ghe-backup-config GHE_CREATE_DATA_DIR disabled"
1919
(
2020
set -e
2121

22-
export GHE_DATA_DIR=$(mktemp -d -u)
22+
export GHE_DATA_DIR="$TRASHDIR/create-enabled-data"
2323
. share/github-backup-utils/ghe-backup-config 2>&1 \
2424
| grep -q "Creating the backup data directory ..."
2525
test -d $GHE_DATA_DIR
2626
rm -rf $GHE_DATA_DIR
2727

28-
export GHE_DATA_DIR=$(mktemp -d -u)
28+
export GHE_DATA_DIR="$TRASHDIR/create-disabled-data"
2929
export GHE_CREATE_DATA_DIR=no
3030
set +e
3131
error=$(. share/github-backup-utils/ghe-backup-config 2>&1)

test/testlib.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ atexit () {
6565

6666
# cleanup injected test key
6767
shared_path=$(dirname $(which ghe-detect-leaked-ssh-keys))
68-
sed -i '/98:d8:99:d3:be:c0:55:05:db:b0:53:2f:1f:ad:b3:60/d' "$shared_path/ghe-ssh-leaked-host-keys-list.txt"
68+
sed -i.bak '/98:d8:99:d3:be:c0:55:05:db:b0:53:2f:1f:ad:b3:60/d' "$shared_path/ghe-ssh-leaked-host-keys-list.txt"
69+
rm -f "$shared_path/ghe-ssh-leaked-host-keys-list.txt.bak"
6970

7071
[ -z "$KEEPTRASH" ] && rm -rf "$TRASHDIR"
7172
if [ $failures -gt 0 ]

0 commit comments

Comments
 (0)