mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-17 14:44:46 +00:00
Automatically create download dir
This commit is contained in:
parent
67efd41074
commit
07977d064c
3 changed files with 22 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as core from '@actions/core'
|
||||
import * as tc from '@actions/tool-cache'
|
||||
import * as path from 'path'
|
||||
import * as exec from '@actions/exec'
|
||||
import * as path from 'path'
|
||||
import {Architecture, Platform} from '../utils/platforms'
|
||||
import {validateChecksum} from './checksum/checksum'
|
||||
import {OWNER, REPO, TOOL_CACHE_NAME} from '../utils/utils'
|
||||
|
@ -21,10 +21,9 @@ export async function downloadLatest(
|
|||
}
|
||||
core.info(`Downloading uv from "${downloadUrl}" ...`)
|
||||
|
||||
const downloadDir = `${process.cwd()}${path.sep}uv`
|
||||
const downloadPath = await tc.downloadTool(
|
||||
downloadUrl,
|
||||
downloadDir,
|
||||
undefined,
|
||||
githubToken
|
||||
)
|
||||
let uvExecutablePath: string
|
||||
|
@ -37,7 +36,7 @@ export async function downloadLatest(
|
|||
uvExecutablePath = path.join(extracted, 'uv')
|
||||
}
|
||||
const version = await getVersion(uvExecutablePath)
|
||||
await validateChecksum(checkSum, downloadPath, arch, platform, version)
|
||||
await validateChecksum(checkSum, extracted, arch, platform, version)
|
||||
const cachedToolDir = await tc.cacheDir(
|
||||
downloadPath,
|
||||
TOOL_CACHE_NAME,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue