From c0bb20e08e426f585b45cafc51b0ba73109a8434 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 4 May 2022 04:20:00 +0000 Subject: [PATCH] nodejs-18_x: fix completion generation Since Node.js 18.0.0 the completion generation requires the environment variable HOME to be set. --- pkgs/development/web/nodejs/nodejs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 53d24a81aec1..ab9a8b95d1a0 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -136,7 +136,7 @@ let ${optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) '' mkdir -p $out/share/bash-completion/completions/ - $out/bin/npm completion > $out/share/bash-completion/completions/npm || : + HOME=$TMPDIR $out/bin/npm completion > $out/share/bash-completion/completions/npm for dir in "$out/lib/node_modules/npm/man/"*; do mkdir -p $out/share/man/$(basename "$dir") for page in "$dir"/*; do