From 731a053a41cc6ad56c1dfacd6e7e5ff3754e03fe Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Tue, 18 Jun 2019 10:48:36 -0400 Subject: [PATCH] Use absolute paths --- lib/setup-node.js | 8 +++++--- src/setup-node.ts | 12 +++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/setup-node.js b/lib/setup-node.js index fcc5f4e2..b59c4b3d 100644 --- a/lib/setup-node.js +++ b/lib/setup-node.js @@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); const installer = __importStar(require("./installer")); +const path = __importStar(require("path")); function run() { return __awaiter(this, void 0, void 0, function* () { try { @@ -30,9 +31,10 @@ function run() { yield installer.getNode(version); } // TODO: setup proxy from runner proxy config - console.log('##[add-matcher].github/tsc.json'); - console.log('##[add-matcher].github/eslint-stylish.json'); - console.log('##[add-matcher].github/eslint-compact.json'); + const matchersPath = path.join(__dirname, '..', '.github'); + console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`); + console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`); + console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`); } catch (error) { core.setFailed(error.message); diff --git a/src/setup-node.ts b/src/setup-node.ts index fb7443ea..c3dcd37d 100644 --- a/src/setup-node.ts +++ b/src/setup-node.ts @@ -1,5 +1,6 @@ import * as core from '@actions/core'; import * as installer from './installer'; +import * as path from 'path'; async function run() { try { @@ -14,9 +15,14 @@ async function run() { } // TODO: setup proxy from runner proxy config - console.log('##[add-matcher].github/tsc.json'); - console.log('##[add-matcher].github/eslint-stylish.json'); - console.log('##[add-matcher].github/eslint-compact.json'); + const matchersPath = path.join(__dirname, '..', '.github'); + console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`); + console.log( + `##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}` + ); + console.log( + `##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}` + ); } catch (error) { core.setFailed(error.message); }