summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@puppetlabs.com>2010-04-12 10:12:57 -0700
committerLuke Kanies <luke@puppetlabs.com>2010-04-12 10:12:57 -0700
commit797f4122c525c2ff30912a49e1c6887d997054de (patch)
treec34845bf2198f286581b5c5755294884253a4158 /lib
parent622bb70c20aaa79523ce8715d45ac103a270f8d7 (diff)
downloadpuppet-797f4122c525c2ff30912a49e1c6887d997054de.tar.gz
puppet-797f4122c525c2ff30912a49e1c6887d997054de.tar.xz
puppet-797f4122c525c2ff30912a49e1c6887d997054de.zip
Making SshAuthorizedKeys tests less brittle
Also making them less likely to try to modify the local filesystem in any way. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/ssh_authorized_key/parsed.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/ssh_authorized_key/parsed.rb b/lib/puppet/provider/ssh_authorized_key/parsed.rb
index b435c513c..6265c6b7f 100644
--- a/lib/puppet/provider/ssh_authorized_key/parsed.rb
+++ b/lib/puppet/provider/ssh_authorized_key/parsed.rb
@@ -89,7 +89,7 @@ Puppet::Type.type(:ssh_authorized_key).provide(:parsed,
end
end
- if target
+ if target and FileTest.exist?(target)
File.chmod(file_perm, target)
end
end