diff --git a/dist/index.js b/dist/index.js index cc8c3d3..ce9b05b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -977,8 +977,8 @@ function run() { return __awaiter(this, void 0, void 0, function* () { try { if (require.main) { - let rootPath = path.dirname(require.main.filename); - yield exec.exec('julia', ['--color=yes', path.join(rootPath, '..', 'src', 'main.jl')]); + let rootPath = path.normalize(path.join(path.dirname(require.main.filename), '..')); + yield exec.exec('julia', ['--color=yes', path.join(rootPath, 'src', 'main.jl')]); } else { core.setFailed('Require method to load root path did not work.'); diff --git a/src/main.ts b/src/main.ts index 9a8c0ce..baf47c8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,9 +5,9 @@ import * as path from 'path'; async function run(): Promise { try { if (require.main) { - let rootPath = path.dirname(require.main.filename); + let rootPath = path.normalize(path.join(path.dirname(require.main.filename), '..')); - await exec.exec('julia', ['--color=yes', path.join(rootPath, '..', 'src', 'main.jl')]); + await exec.exec('julia', ['--color=yes', path.join(rootPath, 'src', 'main.jl')]); } else { core.setFailed('Require method to load root path did not work.')