From 4a09cc5e2672fa3b78e02b167398847987ce1757 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 20 Aug 2026 16:44:02 -0400 Subject: [PATCH] fix: empty /app/version: read installed package.json --- Containerfile | 2 +- Containerfile.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Containerfile b/Containerfile index a9d9faf..3e6b7c1 100644 --- a/Containerfile +++ b/Containerfile @@ -38,7 +38,7 @@ LABEL org.opencontainers.image.title="immich-cli" \ RUN pkg update && pkg install -y ca_root_nss node22 npm-node22 \ && npm install -g @immich/cli@${IMMICH_CLI_VERSION} \ && mkdir -p /app \ - && npm list -g @immich/cli --depth=0 | sed -n 's/.*@//p' > /app/version \ + && node -p "require('/usr/local/lib/node_modules/@immich/cli/package.json').version" > /app/version \ && npm cache clean --force \ && pkg clean -ay && rm -rf /var/cache/pkg/* /root/.npm diff --git a/Containerfile.j2 b/Containerfile.j2 index 61bf08c..988224f 100644 --- a/Containerfile.j2 +++ b/Containerfile.j2 @@ -32,7 +32,7 @@ LABEL org.opencontainers.image.title="immich-cli" \ RUN pkg update && pkg install -y ca_root_nss node22 npm-node22 \ && npm install -g @immich/cli@${IMMICH_CLI_VERSION} \ && mkdir -p /app \ - && npm list -g @immich/cli --depth=0 | sed -n 's/.*@//p' > /app/version \ + && node -p "require('/usr/local/lib/node_modules/@immich/cli/package.json').version" > /app/version \ && npm cache clean --force \ && pkg clean -ay && rm -rf /var/cache/pkg/* /root/.npm