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

Module add #166

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Module add #166

wants to merge 2 commits into from

Conversation

spasarok
Copy link
Collaborator

@spasarok spasarok commented Aug 8, 2016

Hello again! I was wondering if you'd be interested in integrating some sort of peru module add command that would allow users to add modules from the command line. My company would find this useful for automating some build tasks using Peru. Let me know what you think! Thanks!

@oconnor663
Copy link
Member

Two PR's in one day! 🎉

I think what we decide on #165 will end up affecting this one, so let's think about them together over there.

elif not params.args['<url>']:
params.runtime.display.print('Please specify a module url. See usage with peru module --help')
elif not params.args['<type>']:
params.runtime.display.print('Please specify a module type. See usage with peru module --help')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing all the work to check required fields in code, just make them required in the docopt string above, by removing the surrounding [ ] braces. Docopt is really nice for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants