WIP: feature/1-add-support-for-fs-crud #47
3 changed files with 14 additions and 1 deletions
|
@ -10,6 +10,16 @@ module GX::Commands
|
|||
config_dir = File.join(@config.home_dir, ".config", "mfm")
|
||||
config_file_path = File.join(config_dir, "config.yml")
|
||||
|
||||
# Override the configuration path if provided
|
||||
puts "Configuration file path: #{config_file_path}"
|
||||
puts "Configuration file path: #{@config.path}"
|
||||
pp @config
|
||||
@config.path.try do |path|
|
||||
config_file_path = path
|
||||
config_dir = File.dirname(path)
|
||||
end
|
||||
exit 1
|
||||
|
||||
# Guard condition to exit if the configuration file already exists
|
||||
if File.exists?(config_file_path)
|
||||
puts "Configuration file already exists at #{config_file_path}. No action taken."
|
||||
|
|
|
@ -14,7 +14,6 @@ module GX::Commands
|
|||
def execute
|
||||
filesystem = @file_system_manager.choose_filesystem
|
||||
raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil?
|
||||
# @file_system_manager.mount_or_umount(filesystem)
|
||||
filesystem.mount
|
||||
@file_system_manager.auto_open(filesystem) if filesystem.mounted? && @config.auto_open
|
||||
end
|
||||
|
|
|
@ -10,6 +10,10 @@ require "./types/modes"
|
|||
require "./parsers/options/help_options"
|
||||
require "./parsers/options/config_options"
|
||||
require "./parsers/options/config_init_options"
|
||||
require "./parsers/options/mapping_create_options"
|
||||
require "./parsers/options/mapping_delete_options"
|
||||
require "./parsers/options/mapping_mount_options"
|
||||
require "./parsers/options/mapping_umount_options"
|
||||
require "./commands/abstract_command"
|
||||
|
||||
module GX
|
||||
|
|
Loading…
Reference in a new issue