From 8ce159d26ebefd19a7ac6ef8c0c64b460cfcf384 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 28 May 2020 23:22:07 -0700 Subject: [PATCH] Better error message for running "update" before "pin" --- pinch.py | 5 +++++ 1 file changed, 5 insertions(+) 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( -- 2.44.1