lix-installer/src
Linus Heckemann f2606d3127
Linus/ds 576 nix store should be in path directly (#148)
* CreateOrAppendFile: setuid safety

* Apply a sensible default mode if the file didn't already exist

* remove some incorrect docs

* Implement CreateOrInsertFile and use it instead of Append for shell rcs

Ubuntu's bashrc has the following lines in it:

  # If not running interactively, don't do anything
  [ -z "$PS1" ] && return

This means that anything appended to the file will only take effect in
interactive sessions. However, we want noninteractive shells to have
Nix on PATH too, e.g. for remote builds. Therefore, we need to add our
snippet to the beginning of the file, not the end.

* Adjust test fixtures to match new behaviour

* interaction: indicate default for confirm correctly

* CreateOrInsertFile: use randomised temporary filename

* Fix temp file creation

* Apply permissions to temp file, not final file

The final file may not exist, and the temporary file is the one whose
permissions will actually be preserved.

* Use the right ActionError for renaming

* Test the SSH behaviour properly

* cargo fmt

* [DS-574] Write to zshenv instead of zshrc

* CreateOrInsertFile -> CreateOrInsertIntoFile

Also move appending behaviour in here.

* Update Linux fixtures

* update darwin-multi fixture

* fix fixture

* fmt
2023-01-09 08:30:28 -08:00
..
action Linus/ds 576 nix store should be in path directly (#148) 2023-01-09 08:30:28 -08:00
bin Rename harmonic to nix-installer (#125) 2022-12-19 18:26:58 +00:00
cli Linus/ds 576 nix store should be in path directly (#148) 2023-01-09 08:30:28 -08:00
os Hammer out a bunch of Mac support 2022-10-19 15:12:50 -07:00
planner Correctly expected error in default planner if nix installed (#151) 2023-01-04 09:32:45 -08:00
channel_value.rs BUGFIX: Call nix-store --load-db & add sandboxed Qemu tests (#138) 2022-12-23 11:07:14 -08:00
error.rs Rename harmonic to nix-installer (#125) 2022-12-19 18:26:58 +00:00
lib.rs Rename harmonic to nix-installer (#125) 2022-12-19 18:26:58 +00:00
plan.rs installplan should not copy self binary (#161) 2023-01-09 08:26:08 -08:00
settings.rs BUGFIX: Call nix-store --load-db & add sandboxed Qemu tests (#138) 2022-12-23 11:07:14 -08:00