Skip to content

Commit cf60917

Browse files
committed
Update BackendRunnerService to handle different paths for reading package.json
1 parent c3827eb commit cf60917

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend-runner/backend-runner.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ export class BackendRunnerService implements OnApplicationBootstrap, OnModuleIni
4444
this._package = {};
4545
try {
4646
if (existsSync('/snapshot/data/package.json')) {
47+
// Build from local
4748
this._package = JSON.parse(readFileSync('/snapshot/data/package.json', 'utf-8'));
4849
} else if (existsSync('/snapshot/sesame-daemon/package.json')) {
50+
// Build from github
4951
this._package = JSON.parse(readFileSync('/snapshot/sesame-daemon/package.json', 'utf-8'));
5052
} else {
53+
// General case
5154
this._package = JSON.parse(readFileSync('package.json', 'utf-8'));
5255
}
5356
} catch (e) {

0 commit comments

Comments
 (0)