Unverified Commit 9f6b99e1 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

runInLinuxVM: minimize saved-env

The export to saved-env was very intentionally done at the very
beginning of vmRunCommand, even jumping through extra hoops just to
avoid the PATH variable from polluting the saved variable.

In 26eba255 we loaded stdenv in the
wrong place, we should do it after saving the previous environment. This
is also more consistent with the order of how we load those values back
in stage2Init.
parent 3952f870
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -230,11 +230,11 @@ rec {


  vmRunCommand = qemuCommand: writeText "vm-run" ''
    export > saved-env
    if [ -f "''${NIX_ATTRS_SH_FILE-}" ]; then
      source "$NIX_ATTRS_SH_FILE"
    fi
    source $stdenv/setup
    export > saved-env

    PATH=${coreutils}/bin
    mkdir xchg