From 602be2cb750266269221a26ed64eccd70cee8f84 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Mon, 23 Mar 2020 12:00:50 -0700 Subject: [PATCH] Fix bug --- dist/index.js | 4 ++-- src/main.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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.')