Skip to content

Commit

Permalink
πŸ’„ Imported utils functions to avoid utils::
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario-SO committed Jun 30, 2024
1 parent 64e0ccb commit d7812e1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ use crate::lock::{
lock_check,
write_lock,
};
use crate::utils::get_current_working_dir;
use crate::utils::{
get_current_working_dir,
check_for_sensitive_files_or_directories_recursive,
prompt_user_for_confirmation
};
use crate::versioning::push_version;
use config::{
add_to_config,
Expand Down Expand Up @@ -275,8 +279,8 @@ pub async fn run(command: Subcommands) -> Result<(), SoldeerError> {
let path_buf = PathBuf::from(&path);

// Check for sensitive files or directories
if utils::check_for_sensitive_files_or_directories_recursive(&path_buf) {
if !utils::prompt_user_for_confirmation() {
if check_for_sensitive_files_or_directories_recursive(&path_buf) {
if !prompt_user_for_confirmation() {
println!("{}", Paint::yellow("Push operation aborted by the user."));
return Ok(());
}
Expand Down

0 comments on commit d7812e1

Please sign in to comment.