This repository was archived by the owner on Mar 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
This repository was archived by the owner on Mar 13, 2022. It is now read-only.
supernova -c option to specify a configuration file is broken #92
Copy link
Copy link
Open
Labels
Description
Regardless of any -c command-line option, supernova's behaviour seems to be:
- If there is a '
.supernova' file in the current directory, use it; - ... otherwise, use
~/.supernova; - ... otherwise, fail with the output:
Traceback (most recent call last):
File "/usr/local/bin/supernova", line 9, in <module>
load_entry_point('supernova==2.0.8', 'console_scripts', 'supernova')()
File "/usr/local/lib/python2.7/dist-packages/click-4.1-py2.7.egg/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-4.1-py2.7.egg/click/core.py", line 643, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/usr/local/lib/python2.7/dist-packages/click-4.1-py2.7.egg/click/core.py", line 560, in make_context
self.parse_args(ctx, args)
File "/usr/local/lib/python2.7/dist-packages/click-4.1-py2.7.egg/click/core.py", line 822, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/usr/local/lib/python2.7/dist-packages/click-4.1-py2.7.egg/click/core.py", line 1326, in handle_parse_result
self.callback, ctx, self, value)
File "/usr/local/lib/python2.7/dist-packages/click-4.1-py2.7.egg/click/core.py", line 54, in invoke_param_callback
return callback(ctx, param, value)
File "build/bdist.linux-x86_64/egg/supernova/executable.py", line 36, in print_env_list
File "build/bdist.linux-x86_64/egg/supernova/config.py", line 35, in run_config
File "build/bdist.linux-x86_64/egg/supernova/config.py", line 45, in load_config
File "build/bdist.linux-x86_64/egg/supernova/config.py", line 77, in get_config_file
Exception: Couldn't find a valid configuration file to parse
... regardless of the existence or otherwise of the specified file, and regardless of whether the '-c' option is used or not.
This is with Python 2.7.6 on Ubuntu 14.04.2 LTS, with supernova from github (commit 472e48a) installed with 'python setup.py install' as root.
P.S. The '--help' text is a little unclear - stating:
-c, --conf TEXT Manually specify a supernova configuration file
... appears to be a little ambiguous as to whether the anticipated argument is a file-path, or a text-string containing the relevant configuration entries. Possibly consider changing "TEXT" to "PATH" or "FILENAME"?