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

replace validate_* with datatypes/assert_type #40

Merged
merged 2 commits into from
Dec 30, 2018

Conversation

bastelfreak
Copy link
Member

No description provided.

String $package_name = $nsclient::params::package_name,
$download_destination = $nsclient::params::download_destination,
String $config_template = $nsclient::params::config_template,
String $install_path = $nsclient::params::install_path
Copy link
Member

Choose a reason for hiding this comment

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

Not absolute path?

Copy link
Member Author

Choose a reason for hiding this comment

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

I always try to only replace the old validate method. In this case it was validate_string and not validate_path

validate_string($nsclient::package_source)
validate_string($nsclient::package_name)
validate_string($nsclient::install_path)
assert_type(String, $nsclient::package_source_location)
Copy link
Member

Choose a reason for hiding this comment

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

Given init.pp is the entry point, these would have already generated a failure earlier, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member Author

Choose a reason for hiding this comment

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

updated it

@bastelfreak bastelfreak merged commit 46858f1 into voxpupuli:master Dec 30, 2018
@bastelfreak bastelfreak deleted the puppet4 branch December 30, 2018 23:18
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.

3 participants