From: Scott Worley Date: Fri, 29 May 2020 06:22:07 +0000 (-0700) Subject: Better error message for running "update" before "pin" X-Git-Tag: 1.3~4 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/8ce159d26ebefd19a7ac6ef8c0c64b460cfcf384 Better error message for running "update" before "pin" --- diff --git a/pinch.py b/pinch.py index 1827281..f84440c 100644 --- a/pinch.py +++ b/pinch.py @@ -509,6 +509,11 @@ def update(args: argparse.Namespace) -> None: assert 'git_repo' not in config[section] continue + if 'git_repo' not in config[section] or 'release_name' not in config[section]: + raise Exception( + 'Cannot update unpinned channel "%s" (Run "pin" before "update")' % + section) + if 'channel_url' in config[section]: tarball = fetch_with_nix_prefetch_url( v, config[section]['tarball_url'], Digest16(