Skip to content

Commit

Permalink
Fix undefined server version when containerized (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienbeurier authored Apr 25, 2023
1 parent 405f676 commit 226a903
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/server/lib/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,5 +432,6 @@ export function resetPasswordSecret() {
}

export function packageJsonFile(): PackageJson {
return JSON.parse(readFileSync(resolve(process.cwd(), 'package.json')).toString('utf-8'));
let localPath = process.env['SERVER_RUN_MODE'] === 'DOCKERIZED' ? 'packages/server/package.json' : 'package.json';
return JSON.parse(readFileSync(resolve(process.cwd(), localPath)).toString('utf-8'));
}

0 comments on commit 226a903

Please sign in to comment.