Skip to content

Commit a1ac448

Browse files
authored
Merge pull request #24 from qt-creator/fix-download
Use util.inspect to format errors
2 parents 87c58dd + fbac8d4 commit a1ac448

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

badges/coverage.svg

+1-1
Loading

dist/index.js

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ReadableStream } from 'stream/web'
66
import { extractFull } from 'node-7z'
77
import path from 'path'
88
import os from 'os'
9+
import util from 'util'
910

1011
const PlatformMap = {
1112
darwin: 'mac',
@@ -43,8 +44,8 @@ async function downloadQtC(urls: string[]): Promise<string[]> {
4344
}
4445
return packages.map(packageName => `${tmpDir}/${packageName}`)
4546
} catch (error) {
46-
core.warning((error as Error).message)
47-
errors.push((error as Error).message)
47+
core.warning(util.inspect(error))
48+
errors.push(util.inspect(error))
4849
}
4950
}
5051
throw new Error(
@@ -118,6 +119,6 @@ export async function run(): Promise<void> {
118119
)
119120
} catch (error) {
120121
// Fail the workflow run if an error occurs
121-
core.setFailed((error as Error).message)
122+
core.setFailed(util.inspect(error))
122123
}
123124
}

0 commit comments

Comments
 (0)