Created Started Cancelled
By: Tom Sydney Kerckhove <syd@cs-syd.eu>
One exec of one binary for a deployment deploy-for.nix built three wrappers, each execing the tool with a different subcommand and its flags, because a deployment needed apply and the two things a stopped deployment needs. It builds one now: nix writes a file saying which router this is and where the halves are, and the wrapper is one exec of one binary with one flag. nix run .#deploy-ccr2004 applies nix run .#deploy-ccr2004 -- download reads the router into the record nix run .#deploy-ccr2004 -- import-rest finishes a stopped deployment Which router is being talked to moved from in front of every subcommand into the ones that need it, since router is told by its file and the rest are told on the command line. --download-with and --finish-with are gone with the wrappers they named: the messages take argv[0] and add the subcommand, so they name whatever the reader actually typed. Two other duplications while looking: run_command_remotely was capture_command_remotely with the answer thrown away and its own copy of the channel handling, including the last unwrap on a read in that file; and download_export was fetch_export with a write on the end. The vm test's environment is runtimeEnv for everything known when it is built, which is all of it but the disk it makes and the two a caller passes in.