Debug windows directory

This commit is contained in:
Kevin Stillhammer 2024-08-24 09:12:22 +02:00
parent 5654f20383
commit e4c1a1723b
No known key found for this signature in database
2 changed files with 20 additions and 0 deletions

8
dist/setup/index.js generated vendored
View File

@ -85497,6 +85497,9 @@ const tc = __importStar(__nccwpck_require__(7784));
const path = __importStar(__nccwpck_require__(1017));
const utils_1 = __nccwpck_require__(239);
const checksum_1 = __nccwpck_require__(4622);
const fs = __importStar(__nccwpck_require__(7147));
const util = __importStar(__nccwpck_require__(3837));
const readdir = util.promisify(fs.readdir);
function tryGetFromToolCache(arch, version) {
core.debug(`Trying to get uv from tool cache for ${version}...`);
const cachedVersions = tc.findAllVersions(utils_1.TOOL_CACHE_NAME, arch);
@ -85520,6 +85523,11 @@ function downloadVersion(platform, arch, version, checkSum, githubToken) {
let extractedDir;
if (platform === 'pc-windows-msvc') {
extractedDir = yield tc.extractZip(downloadPath);
const files = yield readdir(extractedDir);
core.info(`Contents of extracted directory ${extractedDir}: ${files.join(', ')}`);
const uvDir = path.join(extractedDir, artifact);
const uvfiles = yield readdir(uvDir);
core.info(`Contents of directory ${uvDir}: ${uvfiles.join(', ')}`);
}
else {
extractedDir = yield tc.extractTar(downloadPath);

View File

@ -5,6 +5,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
@ -41,6 +46,13 @@ export async function downloadVersion(
let extractedDir: string
if (platform === 'pc-windows-msvc') {
extractedDir = await tc.extractZip(downloadPath)
const files = await readdir(extractedDir)
core.info(
`Contents of extracted directory ${extractedDir}: ${files.join(', ')}`
)
const uvDir = path.join(extractedDir, artifact)
const uvfiles = await readdir(uvDir)
core.info(`Contents of directory ${uvDir}: ${uvfiles.join(', ')}`)
} else {
extractedDir = await tc.extractTar(downloadPath)
}