diff --git a/src/cli_user_choices.rs b/src/cli_user_choices.rs index 9581826..1092abe 100644 --- a/src/cli_user_choices.rs +++ b/src/cli_user_choices.rs @@ -19,14 +19,18 @@ use crate::core_functions::InventoryCostingMethod; use crate::string_utils; -pub fn choose_file_for_import() -> Result> { +pub fn choose_file_for_import(flag_to_accept_cli_args: bool) -> Result> { + + if flag_to_accept_cli_args { + println!("\nWARN: Flag to 'accept args' was set, but 'file' is missing.\n"); + } println!("Please input a file (absolute or relative path) to import: "); let (file_string, has_tilde) = _get_path()?; if has_tilde { - choose_file_for_import() + choose_file_for_import(flag_to_accept_cli_args) } else { Ok( PathBuf::from(file_string) ) } diff --git a/src/setup.rs b/src/setup.rs index 5c21af0..6c868b1 100644 --- a/src/setup.rs +++ b/src/setup.rs @@ -32,7 +32,7 @@ pub (crate) fn run_setup(args: super::Cli) -> Result<(PathBuf, ImportProcessPara let input_file_path = match args.file_to_import { Some(file) => file, - None => cli_user_choices::choose_file_for_import()? + None => cli_user_choices::choose_file_for_import(args.flags.accept_args)? }; let wizard_or_not_args = ArgsForImportVarsTBD {