Skip to content

Commit

Permalink
Bootstrap: Simplified logic for offering --machine argument
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Nov 26, 2023
1 parent 117096e commit edc13ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Bootstrap/BootstrapProcess.Args.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,11 @@ public BootstrapProcess(IBootstrapHandler handler)
});
_options.Add("wait", () => "Wait for {_embeddedConfig.AppName} to exit after running it.", _ => _wait = true);
}
if (BootstrapConfig.Instance.IntegrateArgs is {} integrateArgs)
if (BootstrapConfig.Instance.IntegrateArgs != null)
{
_options.Add("no-integrate", () => $"Do not integrate {appName} into the desktop environment.", _ => _noIntegrate = true);
_options.Add("integrate-args=", () => "Override command-line arguments for '0install integrate'.", x => _integrateArgs = x);
if (!integrateArgs.Contains("--machine"))
_options.Add("machine", () => $"Integrate {appName} machine-wide (for the entire computer) instead of just for the current user.", _ => _machineWide = true);
_options.Add("machine", () => $"Integrate {appName} machine-wide (for the entire computer) instead of just for the current user.", _ => _machineWide = true);
}
}
else
Expand Down

0 comments on commit edc13ef

Please sign in to comment.