added legacy mode
parent
1dd669697e
commit
009079742a
|
@ -11,6 +11,12 @@ pub struct Arguments {
|
||||||
pub action: String,
|
pub action: String,
|
||||||
#[arg(help = "Which project folder to use, defined in your env file. E.g. xxx_DIR.")]
|
#[arg(help = "Which project folder to use, defined in your env file. E.g. xxx_DIR.")]
|
||||||
pub project: String,
|
pub project: String,
|
||||||
|
#[arg(
|
||||||
|
short = 'l',
|
||||||
|
long = "legacy",
|
||||||
|
help = "Legacy mode for old env reading."
|
||||||
|
)]
|
||||||
|
pub legacy: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Arguments {
|
impl Arguments {
|
||||||
|
|
12
src/main.rs
12
src/main.rs
|
@ -21,12 +21,18 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let start: bool = args.action == "up";
|
let start: bool = args.action == "up";
|
||||||
|
|
||||||
start_docker_compose(&config.container_service, &config.container_dir, start)?;
|
start_docker_compose(&config.container_service, &config.container_dir, start)?;
|
||||||
set_local_db(start, &config)?;
|
if args.legacy {
|
||||||
|
println!("[!] Legacy mode active.");
|
||||||
|
set_local_db(start, &config)?;
|
||||||
|
toggle_index(start, &config)?;
|
||||||
|
} else {
|
||||||
|
println!("[!] Legacy mode deactivated.");
|
||||||
|
}
|
||||||
|
|
||||||
set_dot_env(start, &config)?;
|
set_dot_env(start, &config)?;
|
||||||
toggle_index(start, &config)?;
|
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"Don't forget your interpreter! Project directory: {}",
|
"[!] Don't forget your interpreter! Project directory: {}",
|
||||||
config.project_dir_as_string()
|
config.project_dir_as_string()
|
||||||
);
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue