11
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2026-05-14 06:50:31 +00:00

Fix TypeScript 6.0 compatibility errors in run.ts (#271)

This commit is contained in:
David Gamero 2026-05-05 14:18:11 -04:00 committed by GitHub
parent 7202adf694
commit 3090233644
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,7 @@ export async function run() {
core.endGroup()
try {
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
if (!process.env['PATH']?.startsWith(path.dirname(cachedPath))) {
core.addPath(path.dirname(cachedPath))
}
} catch {
@ -54,7 +54,7 @@ export async function getLatestHelmVersion(): Promise<string> {
return release
} catch (err) {
core.warning(
`Error while fetching latest Helm release: ${err.toString()}. Using default version ${stableHelmVersion}`
`Error while fetching latest Helm release: ${err instanceof Error ? err.message : String(err)}. Using default version ${stableHelmVersion}`
)
return stableHelmVersion
}