Skip to content

Commit

Permalink
[Runtime] fix: find project dir via autoloader finder
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Nov 13, 2023
1 parent 584906c commit 9890881
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const mainExports = trampoline(file);
let runtime = nullish(process.env.APP_RUNTIME, () => Jymfony.Component.Runtime.JymfonyRuntime);
const reflection = new ReflectionClass(runtime);

runtime = reflection.newInstance(Object.assign({ project_dir: dirname(file) }, nullish(globalThis.APP_RUNTIME_OPTIONS, () => ({}))));
runtime = reflection.newInstance(Object.assign({
project_dir: __jymfony.autoload.finder.findRoot(),
}, nullish(globalThis.APP_RUNTIME_OPTIONS, () => ({}))));

let [ app, args ] = runtime.getResolver(mainExports['default']).resolve();
(async function () {
Expand Down

0 comments on commit 9890881

Please sign in to comment.