WIP: feature/1-add-support-for-fs-crud #47

Draft
glenux wants to merge 53 commits from feature/1-add-support-for-fs-crud into develop
3 changed files with 14 additions and 1 deletions
Showing only changes of commit ced3168471 - Show all commits

View file

@ -10,6 +10,16 @@ module GX::Commands
config_dir = File.join(@config.home_dir, ".config", "mfm") config_dir = File.join(@config.home_dir, ".config", "mfm")
config_file_path = File.join(config_dir, "config.yml") 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 # Guard condition to exit if the configuration file already exists
if File.exists?(config_file_path) if File.exists?(config_file_path)
puts "Configuration file already exists at #{config_file_path}. No action taken." puts "Configuration file already exists at #{config_file_path}. No action taken."

View file

@ -14,7 +14,6 @@ module GX::Commands
def execute def execute
filesystem = @file_system_manager.choose_filesystem filesystem = @file_system_manager.choose_filesystem
raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil? raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil?
# @file_system_manager.mount_or_umount(filesystem)
filesystem.mount filesystem.mount
@file_system_manager.auto_open(filesystem) if filesystem.mounted? && @config.auto_open @file_system_manager.auto_open(filesystem) if filesystem.mounted? && @config.auto_open
end end

View file

@ -10,6 +10,10 @@ require "./types/modes"
require "./parsers/options/help_options" require "./parsers/options/help_options"
require "./parsers/options/config_options" require "./parsers/options/config_options"
require "./parsers/options/config_init_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" require "./commands/abstract_command"
module GX module GX