.data() -> .c_str() to be on the safe side

This commit is contained in:
Eelco Dolstra 2024-01-12 13:00:53 +01:00
parent 66bd1b0298
commit 7c6f093abc
1 changed files with 2 additions and 2 deletions

View File

@ -603,7 +603,7 @@ struct CmdDevelop : Common, MixEnvironment
setEnviron();
// prevent garbage collection until shell exits
setenv("NIX_GCROOT", gcroot.data(), 1);
setenv("NIX_GCROOT", gcroot.c_str(), 1);
Path shell = "bash";
@ -648,7 +648,7 @@ struct CmdDevelop : Common, MixEnvironment
// Override SHELL with the one chosen for this environment.
// This is to make sure the system shell doesn't leak into the build environment.
setenv("SHELL", shell.data(), 1);
setenv("SHELL", shell.c_str(), 1);
// If running a phase or single command, don't want an interactive shell running after
// Ctrl-C, so don't pass --rcfile