spack buildcache sync (--manifest-glob <glob> | <src> <dest>) are mutually exclusive (#38533)
This commit is contained in:
parent
a076548bd4
commit
cd67b2a1a9
1 changed files with 6 additions and 3 deletions
|
@ -224,20 +224,20 @@ def setup_parser(subparser):
|
|||
# Sync buildcache entries from one mirror to another
|
||||
sync = subparsers.add_parser("sync", help=sync_fn.__doc__)
|
||||
sync.add_argument(
|
||||
"--manifest-glob",
|
||||
default=None,
|
||||
help="A quoted glob pattern identifying copy manifest files",
|
||||
"--manifest-glob", help="A quoted glob pattern identifying copy manifest files"
|
||||
)
|
||||
sync.add_argument(
|
||||
"src_mirror",
|
||||
metavar="source mirror",
|
||||
type=arguments.mirror_name_or_url,
|
||||
nargs="?",
|
||||
help="Source mirror name, path, or URL",
|
||||
)
|
||||
sync.add_argument(
|
||||
"dest_mirror",
|
||||
metavar="destination mirror",
|
||||
type=arguments.mirror_name_or_url,
|
||||
nargs="?",
|
||||
help="Destination mirror name, path, or URL",
|
||||
)
|
||||
sync.set_defaults(func=sync_fn)
|
||||
|
@ -557,6 +557,9 @@ def sync_fn(args):
|
|||
manifest_copy(glob.glob(args.manifest_glob))
|
||||
return 0
|
||||
|
||||
if args.src_mirror is None or args.dest_mirror is None:
|
||||
tty.die("Provide mirrors to sync from and to.")
|
||||
|
||||
src_mirror = args.src_mirror
|
||||
dest_mirror = args.dest_mirror
|
||||
|
||||
|
|
Loading…
Reference in a new issue