Merge pull request 'fix: handle 'fusermount -u' return codes' (#27) from feature/16-handle-fusermount-u-return-codes into develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #27
This commit is contained in:
commit
dace7bf9f4
1 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,13 @@ module GX
|
|||
module GenericFilesystem
|
||||
def unmount
|
||||
system("fusermount -u #{mount_dir.shellescape}")
|
||||
puts "Filesystem #{name} is now closed.".colorize(:green)
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue