Skip to content

Commit

Permalink
Merge pull request #352 from CyberShadow/pull-20181125-164347
Browse files Browse the repository at this point in the history
Fix Issue 19434 - "Invalid signature" when using install.sh with no ~/.gnupg
  • Loading branch information
wilzbach authored Nov 27, 2018
2 parents e82784c + ce79494 commit ce22504
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,9 @@ verify() {
if [ "$GPG" = x ]; then
return
fi
if ! $GPG --list-keys >/dev/null; then
fatal "Broken GPG installation"
fi
if ! $GPG -q --verify --keyring "$ROOT/d-keyring.gpg" --no-default-keyring <(fetch "${urls[@]}") "$path" 2>/dev/null; then
rm "$path" # delete invalid files
fatal "Invalid signature ${urls[0]}"
Expand Down
7 changes: 6 additions & 1 deletion travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ if [ "${TRAVIS_OS_NAME:-}" != "osx" ]; then
)
fi

testFile=/tmp/$(mktemp tmp_XXXXXXXX)
testDir=/tmp/dlang-installer-test-$UID
rm -rf "$testDir"
mkdir -m 700 "$testDir"
export HOME=$testDir

testFile="$testDir"/test
echo "void main(){ import std.stdio; __VERSION__.writeln;}" > "${testFile}.d"

for idx in "${!compilers[@]}"
Expand Down

0 comments on commit ce22504

Please sign in to comment.