summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmriti <sgarg@msystechnologies.com>2021-11-30 17:06:10 +0530
committersmriti <sgarg@msystechnologies.com>2021-11-30 17:06:10 +0530
commit1b0bfdda809780f1746f1822d96338028492b66f (patch)
treefc747f370a99eb6208506da98e363c550ac15a6c
parent5fa2c7ffae1e5b235e2bc72eb3f4e63c531b43c9 (diff)
downloadchef-1b0bfdda809780f1746f1822d96338028492b66f.tar.gz
Rescued error in case losetup command does not exist
Signed-off-by: smriti <sgarg@msystechnologies.com>
-rw-r--r--lib/chef/provider/mount/linux.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/provider/mount/linux.rb b/lib/chef/provider/mount/linux.rb
index 43852e330b..83fbfab957 100644
--- a/lib/chef/provider/mount/linux.rb
+++ b/lib/chef/provider/mount/linux.rb
@@ -32,6 +32,9 @@ class Chef
def loop_mount_points
# get loop_mount_points only if not initialized earlier
@loop_mount_points ||= shell_out!("losetup -a").stdout
+
+ rescue Errno::ENOENT
+ @loop_mount_points = ""
end
def mounted?