File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const rootError = "warning: installing Nix as root is not supported by this scri
29
29
30
30
// Install runs the install script for Nix. daemon has 3 states
31
31
// nil is unset. false is --no-daemon. true is --daemon.
32
- func Install (writer io.Writer , daemon func () * bool ) error {
32
+ func Install (writer io.Writer , daemonFn func () * bool ) error {
33
33
if isRoot () && build .OS () == build .OSWSL {
34
34
return usererr .New ("Nix cannot be installed as root on WSL. Please run as a normal user with sudo access." )
35
35
}
@@ -51,8 +51,8 @@ func Install(writer io.Writer, daemon func() *bool) error {
51
51
installScript += " linux --init none"
52
52
}
53
53
installScript += " --no-confirm"
54
- } else if daemon != nil {
55
- if * daemon () {
54
+ } else if daemon := daemonFn (); daemon != nil {
55
+ if * daemon {
56
56
installScript += " -- --daemon"
57
57
} else {
58
58
installScript += " -- --no-daemon"
You can’t perform that action at this time.
0 commit comments