diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2011-03-24 17:51:59 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2011-03-25 15:20:39 -0700 |
| commit | daaa048a8d8829ad509b4a456826cc8a33cf6444 (patch) | |
| tree | 817971bd3c1a7e8383bc3243833b8d1367e768dc /lib/puppet/node | |
| parent | c7f6e5ee743c061c020521651360bba240ae4519 (diff) | |
| download | puppet-daaa048a8d8829ad509b4a456826cc8a33cf6444.tar.gz puppet-daaa048a8d8829ad509b4a456826cc8a33cf6444.tar.xz puppet-daaa048a8d8829ad509b4a456826cc8a33cf6444.zip | |
(#5477) Allow watch_file to watch non-existent files, especially site.pp
The watch_file mechanism would refuse to monitor paths to files that
didn't exist. This patch makes it possible to watch a file that hasn't
been created yet, so when it is created, you manifests will get
reparsed.
Paired-With: Max Martin <max@puppetlabs.com>
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'lib/puppet/node')
| -rw-r--r-- | lib/puppet/node/environment.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/puppet/node/environment.rb b/lib/puppet/node/environment.rb index 7877b7f73..d50530618 100644 --- a/lib/puppet/node/environment.rb +++ b/lib/puppet/node/environment.rb @@ -76,7 +76,7 @@ class Puppet::Node::Environment # per environment semantics with an efficient most common cases; we almost # always just return our thread's known-resource types. Only at the start # of a compilation (after our thread var has been set to nil) or when the - # environment has changed do we delve deeper. + # environment has changed do we delve deeper. Thread.current[:known_resource_types] = nil if (krt = Thread.current[:known_resource_types]) && krt.environment != self Thread.current[:known_resource_types] ||= synchronize { if @known_resource_types.nil? or @known_resource_types.stale? @@ -128,7 +128,7 @@ class Puppet::Node::Environment to_s.to_sym end - # The only thing we care about when serializing an environment is its + # The only thing we care about when serializing an environment is its # identity; everything else is ephemeral and should not be stored or # transmitted. def to_zaml(z) @@ -156,7 +156,6 @@ class Puppet::Node::Environment parser.string = code else file = Puppet.settings.value(:manifest, name.to_s) - return empty_parse_result unless File.exist?(file) parser.file = file end parser.parse |
