Add fail-fast guard for the removed environment variable
Intent: Prevent silent misconfiguration by immediately erroring if an operator still has the removed PIKACI_REMOTE_LINUX_VM_INCUS_LANES variable set, directing them to the replacement PIKACI_REMOTE_LINUX_VM_BACKEND variable.
Affected files: crates/pikaci/src/main.rs
@@ -86,6 +86,7 @@ enum RunOutputArg {
fn main() -> anyhow::Result<()> {
let cli = Cli::parse();
+ fail_if_removed_backend_selector_is_set()?;
@@ -199,6 +200,18 @@ fn main() -> anyhow::Result<()> {
+fn fail_if_removed_backend_selector_is_set() -> anyhow::Result<()> {
+ let Ok(value) = std::env::var("PIKACI_REMOTE_LINUX_VM_INCUS_LANES") else {
+ return Ok(());
+ };
+ if value.trim().is_empty() {
+ return Ok(());
+ };
+ bail!(
+ "PIKACI_REMOTE_LINUX_VM_INCUS_LANES has been removed; use PIKACI_REMOTE_LINUX_VM_BACKEND=incus|microvm|auto"
+ );
+}
A new fail_if_removed_backend_selector_is_set function is called at the very top of main(), before any run options are constructed. It checks whether PIKACI_REMOTE_LINUX_VM_INCUS_LANES is set to a non-empty value and, if so, returns an actionable error message telling the operator to switch to PIKACI_REMOTE_LINUX_VM_BACKEND=incus|microvm|auto.
This is a deliberate "break loudly" pattern: rather than silently ignoring the old variable (which could lead operators to believe their lane-level overrides are still active), the program refuses to start. Empty or unset values are tolerated so that environments that merely export the variable without a value are not affected.