Compare commits

...

2 commits

Author SHA1 Message Date
9f3f3b24c1 fix: auto-open should not run on umounted filesystems
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-24 19:25:50 +01:00
041550cc0f fix: handle mount errors (with the right message) 2023-11-24 19:25:21 +01:00
5 changed files with 11 additions and 15 deletions

View file

@ -101,7 +101,7 @@ module GX
raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil? raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil?
mount_or_umount(filesystem) mount_or_umount(filesystem)
auto_open(filesystem) if @config.auto_open auto_open(filesystem) if filesystem.mounted? && @config.auto_open
end end
end end

View file

@ -42,9 +42,14 @@ module GX::Models::Concerns
return return
end end
yield result_status = yield
if result_status.success?
puts "Models #{name} is now available on #{mount_point_safe}".colorize(:green) puts "Models #{name} is now available on #{mount_point_safe}".colorize(:green)
else
puts "Error mounting the vault".colorize(:red)
return
end
end end
end end

View file

@ -32,10 +32,7 @@ module GX::Models
output: STDOUT, output: STDOUT,
error: STDERR error: STDERR
) )
unless process.wait.success? return process.wait
puts "Error mounting the vault".colorize(:red)
return
end
end end
end end
end end

View file

@ -32,10 +32,7 @@ module GX::Models
output: STDOUT, output: STDOUT,
error: STDERR error: STDERR
) )
unless process.wait.success? return process.wait
puts "Error mounting the filesystem".colorize(:red)
return
end
end end
end end
end end

View file

@ -39,10 +39,7 @@ module GX::Models
output: STDOUT, output: STDOUT,
error: STDERR error: STDERR
) )
unless process.wait.success? return process.wait
puts "Error mounting the filesystem".colorize(:red)
return
end
end end
end end
end end