mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-01-19 16:28:18 +08:00
more debug logs
This commit is contained in:
parent
65e8a8ce38
commit
eb355a21cb
BIN
dist/setup/index.js
generated
vendored
BIN
dist/setup/index.js
generated
vendored
Binary file not shown.
@ -27,18 +27,18 @@ export async function downloadLatest(
|
||||
githubToken
|
||||
)
|
||||
let uvExecutablePath: string
|
||||
let extracted: string
|
||||
let extractedDir: string
|
||||
if (platform === 'pc-windows-msvc') {
|
||||
extracted = await tc.extractZip(downloadPath)
|
||||
uvExecutablePath = path.join(extracted, 'uv.exe')
|
||||
extractedDir = await tc.extractZip(downloadPath)
|
||||
uvExecutablePath = path.join(extractedDir, 'uv.exe')
|
||||
} else {
|
||||
extracted = await tc.extractTar(downloadPath)
|
||||
uvExecutablePath = path.join(extracted, 'uv')
|
||||
extractedDir = await tc.extractTar(downloadPath)
|
||||
uvExecutablePath = path.join(extractedDir, 'uv')
|
||||
}
|
||||
const version = await getVersion(uvExecutablePath)
|
||||
await validateChecksum(checkSum, extracted, arch, platform, version)
|
||||
await validateChecksum(checkSum, downloadPath, arch, platform, version)
|
||||
const cachedToolDir = await tc.cacheDir(
|
||||
downloadPath,
|
||||
extractedDir,
|
||||
TOOL_CACHE_NAME,
|
||||
version,
|
||||
arch
|
||||
|
@ -4,6 +4,11 @@ import {OWNER, REPO, TOOL_CACHE_NAME} from '../utils/utils'
|
||||
import {Architecture, Platform} from '../utils/platforms'
|
||||
import {validateChecksum} from './checksum/checksum'
|
||||
|
||||
import * as fs from 'fs'
|
||||
import * as util from 'util'
|
||||
|
||||
const readdir = util.promisify(fs.readdir)
|
||||
|
||||
export function tryGetFromToolCache(
|
||||
arch: Architecture,
|
||||
version: string
|
||||
@ -43,5 +48,10 @@ export async function downloadVersion(
|
||||
} else {
|
||||
extractedDir = await tc.extractTar(downloadPath)
|
||||
}
|
||||
core.info(`Extracted uv to "${extractedDir}"`)
|
||||
// list the contents of extracted dir
|
||||
const files = await readdir(extractedDir)
|
||||
core.info(`Contents of extracted directory: ${files.join(', ')}`)
|
||||
|
||||
return await tc.cacheDir(extractedDir, TOOL_CACHE_NAME, version, arch)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user