Skip to content

Commit 83a022c

Browse files
authored
Merge pull request #264 from github/snh/sed-i
Fix OS X Travis Builds
2 parents 558e909 + 1532d68 commit 83a022c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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)