X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/01ba0eb2f8683ddb6f892c7adc98626cdba0d236..ab7ebb2f956159d846cf9eb18d78130bd5821aaf:/pinch.py diff --git a/pinch.py b/pinch.py index b044faf..787555f 100644 --- a/pinch.py +++ b/pinch.py @@ -514,6 +514,8 @@ def update(args: argparse.Namespace) -> None: ensure_git_rev_available(v, channel) tarball = git_get_tarball(v, channel) + if section in exprs: + raise Exception('Duplicate channel "%s"' % section) exprs[section] = ( 'f: f { name = "%s"; channelName = "%%s"; src = builtins.storePath "%s"; }' % (config[section]['release_name'], tarball)) @@ -521,6 +523,8 @@ def update(args: argparse.Namespace) -> None: for config in configs: for section in config.sections(): if 'alias_of' in config[section]: + if section in exprs: + raise Exception('Duplicate channel "%s"' % section) exprs[section] = exprs[str(config[section]['alias_of'])] command = [