Skip to content

Commit

Permalink
replace the deprecated File.exists? method with File.exist?
Browse files Browse the repository at this point in the history
this is now required by vagrant 2.4.3 because it uses ruby 3.3.6 which removed File.exists?
  • Loading branch information
rgl committed Nov 12, 2024
1 parent 3b4367f commit ab6b50d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end
# NB libvirtd libvirt-qemu:kvm MUST have read permissions to the iso file path.
# see https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
def create_cloud_init_iso(cloud_init_data_path, env, config, group, cloud_init_user_data, cloud_init_network_config)
if !File.exists?(cloud_init_data_path) || File.mtime(cloud_init_data_path) < File.mtime(__FILE__)
if !File.exist?(cloud_init_data_path) || File.mtime(cloud_init_data_path) < File.mtime(__FILE__)
cloud_init_data_parent_path = File.dirname(cloud_init_data_path)
FileUtils.mkdir_p(cloud_init_data_parent_path, :mode => 0750)
FileUtils.chown(nil, group, cloud_init_data_parent_path) if group
Expand Down

0 comments on commit ab6b50d

Please sign in to comment.