mirror of
https://github.com/Azure/setup-helm.git
synced 2026-05-07 06:11:16 +00:00
Fix TypeScript 6.0 compatibility errors in run.ts (#271)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user