From ebd802865f56b98517da6de9244fbc1631650a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Tue, 7 May 2024 20:59:59 +0200 Subject: [PATCH] better warnings, fix ci failing --- .github/workflows/test.yml | 1 - src/utils.ts | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5009221..55d42fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -136,7 +136,6 @@ jobs: - windows-latest content: - "1.1.0" - - "latest" steps: - name: Checkout uses: actions/checkout@v4 diff --git a/src/utils.ts b/src/utils.ts index 8089ec6..4cfb051 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -57,9 +57,12 @@ export function readVersionFromFile( let output: string | undefined; try { output = reader(readFileSync(path, "utf8"))?.trim(); - console.log(output); + + if (!output) { + warning(`Failed to read version from ${file}`); + continue; + } } catch (error) { - console.log(error); const { message } = error as Error; warning(`Failed to read ${file}: ${message}`); } finally {