mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
nix-shell: Don't warn about the lack of a GC root
This commit is contained in:
parent
0c1198cf08
commit
769f662165
2 changed files with 6 additions and 1 deletions
|
@ -35,8 +35,11 @@ static void sigintHandler(int signo)
|
|||
}
|
||||
|
||||
|
||||
static bool gcWarning = true;
|
||||
|
||||
void printGCWarning()
|
||||
{
|
||||
if (!gcWarning) return;
|
||||
static bool haveWarned = false;
|
||||
warnOnce(haveWarned,
|
||||
"you did not specify `--add-root'; "
|
||||
|
@ -212,6 +215,8 @@ static void initAndRun(int argc, char * * argv)
|
|||
settings.useBuildHook = false;
|
||||
else if (arg == "--show-trace")
|
||||
settings.showTrace = true;
|
||||
else if (arg == "--no-gc-warning")
|
||||
gcWarning = false;
|
||||
else if (arg == "--option") {
|
||||
++i; if (i == args.end()) throw UsageError("`--option' requires two arguments");
|
||||
string name = *i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue