Skip to content

Commit

Permalink
Merge pull request NixOS#7217 from NixOS/restore-nix-build-remote
Browse files Browse the repository at this point in the history
Fix `nix __build-remote`
  • Loading branch information
edolstra authored Oct 27, 2022
2 parents 9323d13 + f8d0193 commit b7e8a3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libstore/build/hook-instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ HookInstance::HookInstance()
buildHookArgs.pop_front();

Strings args;
args.push_back(std::string(baseNameOf(buildHook)));

for (auto & arg : buildHookArgs)
args.push_back(arg);

args.push_back(std::string(baseNameOf(settings.buildHook.get())));
args.push_back(std::to_string(verbosity));

/* Create a pipe to get the output of the child. */
Expand Down
2 changes: 1 addition & 1 deletion src/nix/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void mainWrapped(int argc, char * * argv)
programPath = argv[0];
auto programName = std::string(baseNameOf(programPath));

if (argc > 0 && std::string_view(argv[0]) == "__build-remote") {
if (argc > 1 && std::string_view(argv[1]) == "__build-remote") {
programName = "build-remote";
argv++; argc--;
}
Expand Down

0 comments on commit b7e8a3b

Please sign in to comment.