Skip to content

Commit

Permalink
✨ Add check that replace actually happened
Browse files Browse the repository at this point in the history
  • Loading branch information
mleduque committed Jul 9, 2024
1 parent a6ea366 commit 80ab5ed
Show file tree
Hide file tree
Showing 13 changed files with 954 additions and 254 deletions.
5 changes: 5 additions & 0 deletions modda-lib/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use clap_derive::{Parser, Subcommand, Args};

use crate::canon_path::CanonPath;
use crate::lowercase::LwcString;
use crate::obtain::get_options::StrictReplaceAction;
use crate::progname::PROGNAME;


Expand Down Expand Up @@ -115,6 +116,10 @@ pub struct Install {
/// If set along with `--record`, will not ask for confirmation before recording.
#[arg(long, requires = "record")]
pub record_with_comment_as_field: bool,

/// Decides what to do if a replace action has a `strict` property that is not obeyed.<br>
#[arg(long)]
pub strict_replace: StrictReplaceAction,
}

impl Install {
Expand Down
3 changes: 1 addition & 2 deletions modda-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ pub mod chitin;
pub mod credentials;
pub mod download;
pub mod file_installer;
pub mod get_module;
pub mod global;
pub mod list_components;
pub mod log_parser;
pub mod lowercase;
pub mod module;
#[macro_use]
pub mod named_unit_variant;
pub mod obtain;
pub mod patch_source;
pub mod post_install;
pub mod process_weidu_mod;
pub mod progname;
pub mod replace;
pub mod run_result;
pub mod run_weidu;
pub mod config;
Expand Down
2 changes: 1 addition & 1 deletion modda-lib/src/modda_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use anyhow::Result;
use crate::args::Install;
use crate::canon_path::CanonPath;
use crate::file_installer::FileInstaller;
use crate::get_module::ModuleDownload;
use crate::config::Config;
use crate::obtain::get_module::ModuleDownload;


pub struct ModdaContext<'a> {
Expand Down
Loading

0 comments on commit 80ab5ed

Please sign in to comment.