Always update connections.env and fix double-toggled connection line
Drop the --legacy flag: set_local_db and toggle_index now run unconditionally instead of only when -l was passed, since that was the flag's only effect. Fix set_dot_env writing the connection/RCC_CONNECTION line twice with opposing polarity (once from the #docker pass, once from the #cidb pass), which flipped it to the wrong value. Collapsed the three separate open/read/write passes into one, toggling both sections and the connection line in a single scan so the connection line is only ever touched once.
This commit is contained in:
@@ -13,13 +13,6 @@ pub struct Arguments {
|
||||
|
||||
#[arg(help = "Possible values are 'up' and 'down'")]
|
||||
pub action: String,
|
||||
|
||||
#[arg(
|
||||
short = 'l',
|
||||
long = "legacy",
|
||||
help = "Legacy mode for old env reading."
|
||||
)]
|
||||
pub legacy: bool,
|
||||
}
|
||||
|
||||
impl Arguments {
|
||||
@@ -40,7 +33,6 @@ mod tests {
|
||||
Arguments {
|
||||
project: "test".to_string(),
|
||||
action: action.to_string(),
|
||||
legacy: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user