Check if project_config_ref is defined before using it
This checks if the $::project_config_ref fact is defined before accessing it. Puppet 4 seems to care about his more than puppet 3 so we are only just notcing this now. Note that this fix relies on puppet boolean operator 'and' short circuiting which I'm not entirely sure if it does yet. Change-Id: I2b89ac146609f9c3b22c05814b85c646f74b393a
This commit is contained in:
parent
3ebe44d16f
commit
41a3cc927d
@ -24,7 +24,7 @@ class project_config(
|
|||||||
$config_dir = Vcsrepo['/etc/project-config']
|
$config_dir = Vcsrepo['/etc/project-config']
|
||||||
|
|
||||||
# Note project_config_ref can be provided by facter if you want to use it.
|
# Note project_config_ref can be provided by facter if you want to use it.
|
||||||
if ($::project_config_ref != undef) {
|
if (defined('$::project_config_ref') and $::project_config_ref != undef) {
|
||||||
$_revision = $::project_config_ref
|
$_revision = $::project_config_ref
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user