fix: handle 'fusermount -u' return codes #27

Merged
glenux merged 1 commit from feature/16-handle-fusermount-u-return-codes into develop 2023-11-20 11:38:03 +00:00
Showing only changes of commit 283606c280 - Show all commits

View file

@ -21,7 +21,13 @@ module GX
module GenericFilesystem
def unmount
system("fusermount -u #{mount_dir.shellescape}")
fusermount_status = $?
if fusermount_status.success? == 0
puts "Filesystem #{name} is now closed.".colorize(:green)
else
puts "Error: Unable to unmount filesystem #{name} (exit code: #{fusermount_status.exit_code}).".colorize(:red)
end
end
def mount(&block)