diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-05 20:27:27 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-05 20:27:27 +0000 |
commit | 1e4abaeccaef620f7e44b21479d5c9ea52c3360a (patch) | |
tree | a8fc334c5f2e534bfd929130d689d53f168269e8 /lib/puppet | |
parent | 7dae24f481282539bb8b2ef544d4c7476fb7631b (diff) | |
download | puppet-1e4abaeccaef620f7e44b21479d5c9ea52c3360a.tar.gz puppet-1e4abaeccaef620f7e44b21479d5c9ea52c3360a.tar.xz puppet-1e4abaeccaef620f7e44b21479d5c9ea52c3360a.zip |
moving cwd existence check into "sync" instead of "validate"
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1085 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rwxr-xr-x | lib/puppet/type/exec.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb index a7d637e57..6fec43520 100755 --- a/lib/puppet/type/exec.rb +++ b/lib/puppet/type/exec.rb @@ -128,6 +128,12 @@ module Puppet self.checkexe + if cwd = self.parent[:cwd] + unless File.directory?(cwd) + self.fail "Working directory '%s' does not exist" % cwd + end + end + # We need a dir to change to, even if it's just the cwd dir = self.parent[:cwd] || Dir.pwd tmppath = ENV["PATH"] @@ -248,10 +254,6 @@ module Puppet if dir.is_a?(Array) dir = dir[0] end - - unless File.directory?(dir) - self.fail "Directory '%s' does not exist" % dir - end dir end @@ -391,6 +393,7 @@ module Puppet validatecmd(self[:command]) end + # FIXME exec should autorequire any exec that 'creates' our cwd autorequire(:file) do reqs = [] |