From 7243935bf964cf3d509de3bc8236c8fe4319de77 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 11 Dec 2024 00:52:51 +0100 Subject: [PATCH] fix: tui should work again --- src/commands/global_tui.cr | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commands/global_tui.cr b/src/commands/global_tui.cr index f826873..64f1d4d 100644 --- a/src/commands/global_tui.cr +++ b/src/commands/global_tui.cr @@ -13,13 +13,14 @@ module GX::Commands def initialize(@config : GX::Config) @config.load_from_env @config.load_from_file - # @file_system_manager = FileSystemManager.new(@config) + @file_system_manager = FileSystemManager.new(@config) end def execute - # raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil? - # @file_system_manager.mount_or_umount(filesystem) - # @file_system_manager.auto_open(filesystem) if filesystem.mounted? && @config.auto_open? + filesystem = @file_system_manager.choose_filesystem + raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil? + @file_system_manager.mount_or_umount(filesystem) + @file_system_manager.auto_open(filesystem) if filesystem.mounted? && @config.auto_open? end def self.handles_mode