Skip to content

Commit

Permalink
feat: log when restoring from cache (#152)
Browse files Browse the repository at this point in the history
* feat: log when restoring from cache

* undo semicolon change
  • Loading branch information
peterldowns authored Feb 14, 2025
1 parent 855ae7a commit b48e1df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import * as os from 'os'
Expand All @@ -26,7 +25,7 @@ export async function run() {

const downloadBaseURL = core.getInput('downloadBaseURL', {required: false})

core.startGroup(`Downloading ${version}`)
core.startGroup(`Installing ${version}`)
const cachedPath = await downloadHelm(downloadBaseURL, version)
core.endGroup()

Expand Down Expand Up @@ -88,7 +87,10 @@ export async function downloadHelm(
version: string
): Promise<string> {
let cachedToolpath = toolCache.find(helmToolName, version)
if (!cachedToolpath) {
if (cachedToolpath) {
core.info(`Restoring '${version}' from cache`)
} else {
core.info(`Downloading '${version}' from '${baseURL}'`)
let helmDownloadPath
try {
helmDownloadPath = await toolCache.downloadTool(
Expand Down

0 comments on commit b48e1df

Please sign in to comment.