nodejs-18_x: fix completion generation

Since Node.js 18.0.0 the completion generation requires the environment
variable HOME to be set.
This commit is contained in:
Mario Rodas 2022-05-04 04:20:00 +00:00
parent 70f212bb5b
commit c0bb20e08e

View file

@ -136,7 +136,7 @@ let
${optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) '' ${optionalString (enableNpm && stdenv.hostPlatform == stdenv.buildPlatform) ''
mkdir -p $out/share/bash-completion/completions/ 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 for dir in "$out/lib/node_modules/npm/man/"*; do
mkdir -p $out/share/man/$(basename "$dir") mkdir -p $out/share/man/$(basename "$dir")
for page in "$dir"/*; do for page in "$dir"/*; do