From 7326478298a3c8b4bbe087b4b0d76f143a27987c Mon Sep 17 00:00:00 2001 From: Gustavo Carreno Date: Thu, 6 Jan 2022 20:55:24 +0000 Subject: [PATCH] fix: Logging inside the test --- README.md | 4 ++-- dist/index.js | 5 ++++- package.json | 2 +- src/Lazarus.ts | 3 +++ src/setup-lazarus.ts | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 252cf0d..42426a2 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Unfortunately there are some restrictions: ```yaml steps: - uses: actions/checkout@v2 -- uses: gcarreno/setup-lazarus@v3.0.12 +- uses: gcarreno/setup-lazarus@v3.0.13 with: lazarus-version: "dist" include-packages: "Synapse 40.1" @@ -110,7 +110,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Lazarus - uses: gcarreno/setup-lazarus@v3.0.12 + uses: gcarreno/setup-lazarus@v3.0.13 with: lazarus-version: ${{ matrix.lazarus-versions }} include-packages: "Synapse 40.1" diff --git a/dist/index.js b/dist/index.js index 31c2e9b..5fb4e77 100644 --- a/dist/index.js +++ b/dist/index.js @@ -616,6 +616,7 @@ class Lazarus { var fpcsrc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpcsrc')); var loc = fs.readdirSync('/Volumes/' + fpcsrc[0]).filter(fn => fn.endsWith('.pkg')); if (typeof (loc) === undefined || typeof (loc[0]) === undefined) { + console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/' + laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/' + laz[0] + '/' + loc[0]; @@ -646,6 +647,7 @@ class Lazarus { var fpc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpc')); var loc = fs.readdirSync('/Volumes/' + fpc[0]).filter(fn => fn.endsWith('.pkg')); if (typeof (loc) === undefined || typeof (loc[0]) === undefined) { + console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/' + laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/' + laz[0] + '/' + loc[0]; @@ -676,6 +678,7 @@ class Lazarus { var laz = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('lazarus')); var loc = fs.readdirSync('/Volumes/' + laz[0]).filter(fn => fn.endsWith('.pkg')); if (typeof (loc) === undefined || typeof (loc[0]) === undefined) { + console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/' + laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/' + laz[0] + '/' + loc[0]; @@ -1019,7 +1022,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); const core = __importStar(__webpack_require__(186)); const inst = __importStar(__webpack_require__(981)); -const _version = '3.0.12'; +const _version = '3.0.13'; function run() { return __awaiter(this, void 0, void 0, function* () { try { diff --git a/package.json b/package.json index 276df28..02998a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-lazarus", - "version": "3.0.12", + "version": "3.0.13", "description": "Set up your GitHub Actions workflow with a specific version of Lazarus", "main": "lib/setup-lazarus.js", "scripts": { diff --git a/src/Lazarus.ts b/src/Lazarus.ts index 0e1921d..a9d1867 100644 --- a/src/Lazarus.ts +++ b/src/Lazarus.ts @@ -504,6 +504,7 @@ export class Lazarus{ var fpcsrc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpcsrc')); var loc = fs.readdirSync('/Volumes/'+fpcsrc[0]).filter(fn => fn.endsWith('.pkg')); if (typeof(loc) === undefined || typeof(loc[0]) === undefined) { + console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/'+laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/'+laz[0]+'/'+loc[0] @@ -536,6 +537,7 @@ export class Lazarus{ var fpc = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('fpc')); var loc = fs.readdirSync('/Volumes/'+fpc[0]).filter(fn => fn.endsWith('.pkg')); if (typeof(loc) === undefined || typeof(loc[0]) === undefined) { + console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/'+laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/'+laz[0]+'/'+loc[0] @@ -569,6 +571,7 @@ export class Lazarus{ var laz = fs.readdirSync('/Volumes').filter(fn => fn.startsWith('lazarus')); var loc = fs.readdirSync('/Volumes/'+laz[0]).filter(fn => fn.endsWith('.pkg')); if (typeof(loc) === undefined || typeof(loc[0]) === undefined) { + console.log('loc or loc[0] undefined'); loc = fs.readdirSync('/Volumes/'+laz[0]).filter(fn => fn.endsWith('.mpkg')); } var full_path = '/Volumes/'+laz[0]+'/'+loc[0] diff --git a/src/setup-lazarus.ts b/src/setup-lazarus.ts index cf4061c..5a21b93 100644 --- a/src/setup-lazarus.ts +++ b/src/setup-lazarus.ts @@ -1,7 +1,7 @@ import * as core from '@actions/core'; import * as inst from './Installer'; -const _version = '3.0.12'; +const _version = '3.0.13'; async function run(): Promise { try {