STASH
Some checks reported errors
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build was killed

This commit is contained in:
Glenn Y. Rolland 2024-10-25 17:33:07 +02:00
parent 6d15d331d8
commit ced3168471
3 changed files with 14 additions and 1 deletions

View file

@ -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."

View file

@ -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

View file

@ -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