WIP: feature/1-add-support-for-fs-crud #47
4 changed files with 2 additions and 6 deletions
|
@ -17,7 +17,6 @@ module GX::Commands
|
|||
end
|
||||
|
||||
def execute
|
||||
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?
|
||||
|
|
|
@ -12,7 +12,6 @@ module GX::Commands
|
|||
def initialize(@config : GX::Config)
|
||||
@config.load_from_env
|
||||
@config.load_from_file
|
||||
@file_system_manager = FileSystemManager.new(@config)
|
||||
end
|
||||
|
||||
def execute
|
||||
|
|
|
@ -13,11 +13,10 @@ module GX::Commands
|
|||
def initialize(@config : GX::Config)
|
||||
@config.load_from_env
|
||||
@config.load_from_file
|
||||
@file_system_manager = FileSystemManager.new(@config)
|
||||
end
|
||||
|
||||
def execute
|
||||
filesystem = @file_system_manager.choose_filesystem
|
||||
filesystem = @config.root.try &.file_system_manager.choose_filesystem
|
||||
raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil?
|
||||
filesystem.mount
|
||||
@file_system_manager.auto_open(filesystem) if filesystem.mounted? && @config.auto_open?
|
||||
|
|
|
@ -13,11 +13,10 @@ module GX::Commands
|
|||
def initialize(@config : GX::Config)
|
||||
@config.load_from_env
|
||||
@config.load_from_file
|
||||
@file_system_manager = FileSystemManager.new(@config)
|
||||
end
|
||||
|
||||
def execute
|
||||
filesystem = @file_system_manager.choose_filesystem
|
||||
filesystem = @config.root.try &.file_system_manager.choose_filesystem
|
||||
raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil?
|
||||
filesystem.umount
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue