From 7f3403bd71d244850ef30a711c52e64f905e9423 Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Sat, 30 Apr 2022 23:18:29 -0700 Subject: [PATCH] build: disable NODE_OPTIONS Production binaries shall NOT take NODE_OPTIONS from end-users. Only the users (developers who use pkg to package their project) should have control over the flags via the "bake in" (--options) mechanism. Bug: vercel/pkg#954, vercel/pkg#989, vercel/pkg#1194, vercel/pkg#1517 --- lib/build.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/build.ts b/lib/build.ts index 2ce10b6..56785c0 100644 --- a/lib/build.ts +++ b/lib/build.ts @@ -55,6 +55,9 @@ function getConfigureArgs(major: number, targetPlatform: string): string[] { } } + // production binaries do NOT take NODE_OPTIONS from end-users + args.push('--without-node-options'); + // DTrace args.push('--without-dtrace');