From 1607ad5076186bbfbf85a55d222aed09e66dc3fe Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 8 Mar 2023 13:53:20 +0100 Subject: [PATCH] Fix uninitialized readFromStdIn variable This was causing random failures in tests/ca/substitute.ca: 'nix copy --file ./content-addressed.nix' wouldn't get the default installable '.' applied in InstallablesCommand::load(), so it would do nothing. --- src/libcmd/command.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcmd/command.hh b/src/libcmd/command.hh index b8116b151..0d84c8395 100644 --- a/src/libcmd/command.hh +++ b/src/libcmd/command.hh @@ -128,7 +128,7 @@ struct InstallablesCommand : virtual Args, SourceExprCommand virtual bool useDefaultInstallables() { return true; } - bool readFromStdIn; + bool readFromStdIn = false; std::vector getFlakesForCompletion() override;