Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
franramirez688 committed Dec 14, 2023
1 parent e55f328 commit 3f0d59c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conan/cli/commands/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def cache_path(conan_api: ConanAPI, parser, subparser, *args):
# Checking exclusive folders depending on the reference
if args.folder in ['export_source', 'source'] and ref is None:
raise ConanException(f"'--folder {args.folder}' requires a recipe reference")
elif args.folder in ['build'] and pref is None:
elif args.folder == 'build' and pref is None:
raise ConanException(f"'--folder {args.folder}' requires a package reference")
elif args.folder is None:
# FIXME: if the package_path(pref) does not exist, this function is raising an error
Expand Down
2 changes: 1 addition & 1 deletion conans/test/integration/command_v2/test_cache_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ def test_cache_path_does_not_exist_folder():

client.run(f"install --requires mypkg/0.1")
client.run(f"cache path {pref} --folder build", assert_error=True)
assert f"ERROR: 'build' folder does not exist for the reference {pref}" in client.out
assert f"ERROR: 'build' folder does not exist for the package reference {pref}" in client.out

0 comments on commit 3f0d59c

Please sign in to comment.