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

print warning when module from filter isn't in managed_modules.yml #78

Open
bastelfreak opened this issue May 21, 2016 · 2 comments
Open

Comments

@bastelfreak
Copy link
Member

I tried to update two modules today that weren't in our managed_modules.yml:

bastelfreak@bastelfreak-ws ~/modulesync_config $ bundle exec msync update -f hiera --message "modulesync 0.6.2" 
bastelfreak@bastelfreak-ws ~/modulesync_config $ bundle exec msync update -f jenkins --message "modulesync 0.6.2" 
bastelfreak@bastelfreak-ws ~/modulesync_config $

the output is nothing, which is very missleading. A warning/message would be cool instead.

@james-powis
Copy link
Member

james-powis commented Jan 5, 2017

I suspect the problem is the use of a filter rather than a strict parameter...

https://github.com/voxpupuli/modulesync/blob/master/lib/modulesync.rb#L50

ways I can see this working is to add an option to provide a specific module which would could work without existing in the managed_modules.yml file... but this feels a bit risky... so perhaps validation of presence is desired...

alternatively an error could be thrown if nothing is found via:

raise 'filter did not match any of the modules in managed_modules.yml' if managed_modules.empty?

I would be happy to submit a PR for either solution

@bittner
Copy link
Contributor

bittner commented May 27, 2018

@james-powis The word "filter" suggests like we're actually filtering a list of modules (not overriding), so the latter solution resonates with the usage pattern. 👍

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

No branches or pull requests

3 participants