Skip to content

Commit e971f19

Browse files
fix
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 55e949d commit e971f19

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

build/scripts/entrypoint-volume.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ run_launcher() {
8484

8585
if [ -n "$runtime_loader" ]; then
8686
echo "[INFO] Using bundled runtime linker: $runtime_loader"
87+
export VSCODE_NODEJS_RUNTIME_LOADER="$runtime_loader"
88+
export VSCODE_NODEJS_RUNTIME_LIB_DIR="$libs_dir"
8789
exec "$runtime_loader" --library-path "$libs_dir" "$node_bin" ./launcher/entrypoint.js
8890
fi
8991

launcher/src/vscode-launcher.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,18 @@ export class VSCodeLauncher {
7272
console.log(` > Running: ${node}`);
7373
console.log(` > Params: ${params}`);
7474

75-
const run = child_process.spawn(node, params);
75+
const runtimeLoader = env.VSCODE_NODEJS_RUNTIME_LOADER;
76+
const runtimeLibDir = env.VSCODE_NODEJS_RUNTIME_LIB_DIR;
77+
78+
let command = node;
79+
let commandArgs = params;
80+
if (runtimeLoader && runtimeLibDir) {
81+
command = runtimeLoader;
82+
commandArgs = ['--library-path', runtimeLibDir, node, ...params];
83+
console.log(` > Using bundled runtime linker: ${runtimeLoader}`);
84+
}
85+
86+
const run = child_process.spawn(command, commandArgs);
7687

7788
run.stdout.on('data', (data: string) => {
7889
console.log(`${data}`);

0 commit comments

Comments
 (0)