Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make conan inspect use all remotes by default #14572

Merged
merged 2 commits into from
Aug 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion conan/cli/commands/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def inspect(conan_api, parser, *args):
parser.add_argument("path", help="Path to a folder containing a recipe (conanfile.py)")
parser.add_argument("-r", "--remote", default=None, action="append",
help="Remote names. Accepts wildcards ('*' means all the remotes available)")
group.add_argument("-nr", "--no-remote", action="store_true",
help='Do not use remote, resolve exclusively in the cache')
parser.add_argument("-l", "--lockfile", action=OnceArgument,
help="Path to a lockfile. Use --lockfile=\"\" to avoid automatic use of "
"existing 'conan.lock' file")
Expand All @@ -37,7 +39,7 @@ def inspect(conan_api, parser, *args):
conanfile_path=path,
cwd=os.getcwd(),
partial=args.lockfile_partial)
remotes = conan_api.remotes.list(args.remote) if args.remote else []
remotes = conan_api.remotes.list(args.remote) if not args.no_remote else []
conanfile = conan_api.local.inspect(path, remotes=remotes, lockfile=lockfile)
result = conanfile.serialize()
# Some of the serialization info is not initialized so it's pointless to show it to the user
Expand Down