nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

`install --force` Broken

Open mtalexan opened this issue 9 months ago • 2 comments

The --force flag to the install command is improperly tracked by/verified in the receipt.json file. This ensures the generated planner configuration cannot be matched when attempting to force re-run an existing matched install, erroring out instead. This defeats the sole purpose of the --force flag.

If manually modifying the receipt.json to set the .planner.settings.force flag to true, it still halts when it says the existing plan is matched rather than obeying the --force flag and running anyway.

mtalexan avatar Apr 04 '25 04:04 mtalexan

Also, it appears the --force can't handle the case where the /nix/tmp-install-dir is still present and populated, even though the --force option literally says it will overwrite existing files.

mtalexan avatar Apr 04 '25 06:04 mtalexan

It appears the intended way to re-run a failed partial install is to copy /nix/receipt.json somewhere else, then call nix-installer.sh install ./receipt.json, effectively using a copy of the prior receipt as the plan for a new install over the top of the existing one.

mtalexan avatar Apr 04 '25 07:04 mtalexan