summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-06-02 13:28:10 -0400
committerBen Gamari <ben@well-typed.com>2020-07-21 14:52:18 -0400
commit8b9a4a1f458b17b0a7d830ec47a711bd2de498c8 (patch)
treea5fe67e200004c72958b1df44e02b6bd1fbb2fed
parent19e80b9af252eee760dc047765a9930ef00067ec (diff)
downloadhaskell-wip/win32-missing-tarball.tar.gz
get-win32-tarballs: Fix detection of missing tarballswip/win32-missing-tarball
This fixes the error message given by configure when the user attempts to configure without first download the win32 tarballs.
-rwxr-xr-xmk/get-win32-tarballs.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/get-win32-tarballs.py b/mk/get-win32-tarballs.py
index 3c99682779..6686119204 100755
--- a/mk/get-win32-tarballs.py
+++ b/mk/get-win32-tarballs.py
@@ -5,6 +5,7 @@ from pathlib import Path
import urllib.request
import subprocess
import argparse
+import sys
from sys import stderr
TARBALL_VERSION = '0.2'
@@ -39,7 +40,8 @@ def fetch_arch(arch: str):
def verify(arch: str):
if not Path(DEST / arch / "SHA256SUMS").is_file():
- raise IOError("SHA256SUMS doesn't exist; have you fetched?")
+ print("SHA256SUMS doesn't exist; have you fetched?", file=stderr)
+ sys.exit(2)
cmd = ['sha256sum', '--quiet', '--check', '--ignore-missing', 'SHA256SUMS']
subprocess.check_call(cmd, cwd=DEST / arch)