Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

mazer gives unclear error message if pointing to invalid release #289

Open
rambleraptor opened this issue Jun 26, 2019 · 0 comments
Open

Comments

@rambleraptor
Copy link

Bug Report

MAZER VERSION
name = mazer
version = 1.0.0
config_file = /Users/alexstephen/.ansible/mazer.yml
uname = Darwin, xxx, 18.6.0, Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64, x86_64
executable_location = /Users/alexstephen/.pyenv/versions/2.7.8/bin/mazer
python_version = 2.7.8 (default, Jun 26 2019, 11:22:17) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)]
python_executable = /Users/alexstephen/.pyenv/versions/2.7.8/bin/python2.7
CONFIGURATION
SUMMARY

If I run mazer publish releases/wrong_file.tar.gz, mazer will say that I have to specify a path to a collection archive instead of saying that I put in an invalid command. This confuses the user, as it makes them think that they didn't use the proper flags / syntax.

This is a really common thing to happen if you're changing namespaces (which changes the release filename).

STEPS TO REPRODUCE
mazer publish releases/wrong_file.tar.gz
EXPECTED RESULTS

An error message pointing out that the file does not exist.

ACTUAL RESULTS
Traceback (most recent call last):
  File "/Users/alexstephen/.pyenv/versions/2.7.8/bin/mazer", line 10, in <module>
    sys.exit(main())
  File "/Users/alexstephen/.pyenv/versions/2.7.8/lib/python2.7/site-packages/ansible_galaxy_cli/main.py", line 36, in main
    exit_code = cli.run()
  File "/Users/alexstephen/.pyenv/versions/2.7.8/lib/python2.7/site-packages/ansible_galaxy_cli/cli/galaxy.py", line 240, in run
    return self.execute()
  File "/Users/alexstephen/.pyenv/versions/2.7.8/lib/python2.7/site-packages/ansible_galaxy_cli/cli/__init__.py", line 152, in execute
    return fn()
  File "/Users/alexstephen/.pyenv/versions/2.7.8/lib/python2.7/site-packages/ansible_galaxy_cli/cli/galaxy.py", line 319, in execute_publish
    raise cli_exceptions.CliOptionsError("- you must specify a path to a collection archive")
ansible_galaxy_cli.exceptions.CliOptionsError: - you must specify a path to a collection archive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant