-
Notifications
You must be signed in to change notification settings - Fork 370
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
auto_dash_names setting is ignored #465
Comments
Strange, I know I tested that before I published, clearly something's gone sideways. Will look into it ASAP. Thanks for the report! |
Yup, my goof. Had all the plumbing set up, and tested, but never tested or implemented that critical bridge between the CLI machinery and the task collection, so "config says no auto dashes -> tell collection not to emit auto-dashed names" never occurs. Fixing now. |
Related, this has caused issues with the fabric's test suite since the task names are now dasherized. As a temp fix, I tried adding ns = Collection(
docs, www, test, coverage, integration, sites, watch_docs,
watch_tests, count_errors, release, travis,
# TODO: update tests and travis.yml to use dasherized names
auto_dash_names=False,
) Running Traceback (most recent call last):
File ".venv/bin/inv", line 11, in <module>
load_entry_point('invoke==0.20.1', 'console_scripts', 'inv')()
File ".venv/lib/python3.6/site-packages/invoke/program.py", line 287, in run
self._parse(argv)
File ".venv/lib/python3.6/site-packages/invoke/program.py", line 357, in _parse
self.parse_tasks()
File ".venv/lib/python3.6/site-packages/invoke/program.py", line 522, in parse_tasks
contexts=self.collection.to_contexts(),
File ".venv/lib/python3.6/site-packages/invoke/collection.py", line 337, in to_contexts
task = self[primary]
File ".venv/lib/python3.6/site-packages/invoke/collection.py", line 285, in __getitem__
return self.task_with_config(name)[0]
File ".venv/lib/python3.6/site-packages/invoke/collection.py", line 322, in task_with_config
return self.tasks[name], ours
File ".venv/lib/python3.6/site-packages/invoke/vendor/lexicon/alias_dict.py", line 80, in __getitem__
return self._handle(key, None, single, multi, unaliased)
File ".venv/lib/python3.6/site-packages/invoke/vendor/lexicon/alias_dict.py", line 62, in _handle
return unaliased(self, key, value)
File ".venv/lib/python3.6/site-packages/invoke/vendor/lexicon/alias_dict.py", line 74, in unaliased
def unaliased(d, key, value): return super(AliasDict, d).__getitem__(key)
KeyError: 'watch-docs' |
Hooking that stuff up exposes another hidden issue, hooray! (Note to self...)
|
@rpkilby That's exactly the issue I'm fixing right now, yup :) |
Works for me now, making sure Travis agrees, then will release as 0.20.2 :) |
It's on PyPI! |
Using invoke version 0.20.1.
./invoke.yaml
and~/.invoke.yaml
:./tasks.py
:Per the documenation, I would expect this to work, but it does not:
Using dashes in the name does work, though:
$ inv my-awesome-task Awesome!
The text was updated successfully, but these errors were encountered: