better warnings, fix ci failing

This commit is contained in:
Jozef Steinhübl 2024-05-07 20:59:59 +02:00
parent 0b54beb9ce
commit ebd802865f
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F
2 changed files with 5 additions and 3 deletions

View file

@ -136,7 +136,6 @@ jobs:
- windows-latest
content:
- "1.1.0"
- "latest"
steps:
- name: Checkout
uses: actions/checkout@v4

View file

@ -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 {