Skip to content

Commit 71ea0bc

Browse files
committed
fix xsd-json-converter on deployment
1 parent c7a7437 commit 71ea0bc

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

deploy/docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ RUN apt-get update && apt-get install -y \
1111

1212
WORKDIR /app
1313
ENV PYTHONPATH=/app/src
14+
# xsd-json-converter bundles a .NET executable; run it in globalization-invariant
15+
# mode so it works on slim images without libicu installed.
16+
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
1417

1518
# Install Python dependencies first (layer-cached separately from app code)
1619
COPY requirements/runtime.txt requirements.txt

external_converters/node/src/converters/xsdToJsonSchemaConverter2.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ function runBundledConverter(executablePath: string, inputPath: string): Promise
5757
fs.chmodSync(executablePath, 0o755);
5858
}
5959

60-
const child = spawn(executablePath, [inputPath]);
60+
const child = spawn(executablePath, [inputPath], {
61+
env: { ...process.env, DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "1" },
62+
});
6163
let stdout = "";
6264
let stderr = "";
6365

0 commit comments

Comments
 (0)