Skip to content

Commit

Permalink
Fix calls to FileUtils.mkdir_p to work on Ruby 3 (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
silug authored Jul 10, 2024
1 parent 4369276 commit 059fa17
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Wed Jul 10 2024 Steven Pritchard <[email protected]> - 6.18.2
- Fix calls to `FileUtils.mkdir_p` to work on Ruby 3

* Tue Jun 18 2024 Rick Gardner <[email protected]> - 6.18.1
- Fixed custom fact on windows bug

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/functions/ssh/autokey.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def autokey(username, key_strength=nil, return_private=nil)

if ( !File.directory?(keydir) )
begin
FileUtils.mkdir_p(keydir,{:mode => 0750})
FileUtils.mkdir_p(keydir, mode: 0750)
rescue
Puppet.warning "ssh::autokey: Could not make directory #{keydir}. Ensure that #{keydir} is writable by 'puppet'"
return retval
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/functions/ssh/global_known_hosts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def write_this_host_key_file(basedir)

begin
if not FileTest.directory?(basedir) then
FileUtils.mkdir_p(basedir,{:mode => 0750})
FileUtils.mkdir_p(basedir, mode: 0750)
end

if not File.stat(basedir).writable? then
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-ssh",
"version": "6.18.1",
"version": "6.18.2",
"author": "SIMP Team",
"summary": "Manage ssh",
"license": "Apache-2.0",
Expand Down

0 comments on commit 059fa17

Please sign in to comment.