build-support/node/import-npm-lock: use printf instead of echo

This is a shell builtin and is safer when dealing with large inputs:
it avoids possible 'argument list too long' errors.
This commit is contained in:
Stefan Frijters
2026-03-22 13:04:17 +01:00
parent 71e72fd110
commit d997cac9c2
@@ -220,8 +220,8 @@ lib.fix (self: {
(
if __structuredAttrs then
''
echo -n "$package" > package.json
echo -n "$packageLock" > package-lock.json
printf "%s" "$package" > package.json
printf "%s" "$packageLock" > package-lock.json
''
else
''