report which lines changed on up/down
set_local_db, toggle_after_line and set_dot_env now return a FileChange (path + before/after line pairs) instead of (), and main prints it after each toggle so 'up'/'down' shows exactly what the program rewrote in each env file.
This commit is contained in:
+2
-2
@@ -24,13 +24,13 @@ fn main() -> Result<()> {
|
||||
start_docker_compose(&config.container_service, &config.container_dir, start)?;
|
||||
if args.legacy {
|
||||
println!("[!] Legacy mode active.");
|
||||
set_local_db(start, &config)?;
|
||||
print!("{}", set_local_db(start, &config)?);
|
||||
toggle_index(start, &config)?;
|
||||
} else {
|
||||
println!("[!] Legacy mode deactivated.");
|
||||
}
|
||||
|
||||
set_dot_env(start, &config)?;
|
||||
print!("{}", set_dot_env(start, &config)?);
|
||||
|
||||
println!(
|
||||
"[!] Don't forget your interpreter! Project directory: {}",
|
||||
|
||||
Reference in New Issue
Block a user