Skip to content

Commit f6978df

Browse files
committed
Debug log extracted folder
1 parent c848e70 commit f6978df

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/macos-install.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ function unpack(packagePath, version) {
106106
return __awaiter(this, void 0, void 0, function* () {
107107
core.debug('Extracting package');
108108
const unpackedPath = yield extractXar(packagePath);
109+
yield exec_1.exec('ls', ['-las', unpackedPath]);
109110
const extractedPath = yield toolCache.extractTar(path.join(unpackedPath, 'Payload'));
110111
core.debug('Package extracted');
111112
const cachedPath = yield toolCache.cacheDir(extractedPath, 'swift-macOS', version);
@@ -116,7 +117,7 @@ function unpack(packagePath, version) {
116117
//FIXME: Workaround until https://github.com/actions/toolkit/pull/207 is merged
117118
function extractXar(file) {
118119
return __awaiter(this, void 0, void 0, function* () {
119-
const dest = path.join(process.env['RUNNER_TEMP'] || '', 'setup-swift', 'tmp', 'extract');
120+
const dest = path.join(process.env['RUNNER_TEMP'] || '', 'setup-swift', 'extract.tmp');
120121
yield io.mkdirP(dest);
121122
const xarPath = yield io.which('xar', true);
122123
yield exec_1.exec(`"${xarPath}"`, ['-x', '-C', dest, '-f', file]);

src/macos-install.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ async function download({ url }: Package) {
104104
async function unpack(packagePath: string, version: string) {
105105
core.debug('Extracting package')
106106
const unpackedPath = await extractXar(packagePath)
107+
await exec('ls', ['-las', unpackedPath])
107108
const extractedPath = await toolCache.extractTar(path.join(unpackedPath, 'Payload'))
108109
core.debug('Package extracted')
109110
const cachedPath = await toolCache.cacheDir(extractedPath, 'swift-macOS', version)
@@ -113,7 +114,7 @@ async function unpack(packagePath: string, version: string) {
113114

114115
//FIXME: Workaround until https://github.com/actions/toolkit/pull/207 is merged
115116
export async function extractXar(file: string): Promise<string> {
116-
const dest = path.join(process.env['RUNNER_TEMP'] || '', 'setup-swift', 'tmp', 'extract')
117+
const dest = path.join(process.env['RUNNER_TEMP'] || '', 'setup-swift', 'extract.tmp')
117118
await io.mkdirP(dest)
118119
const xarPath: string = await io.which('xar', true)
119120
await exec(`"${xarPath}"`, ['-x', '-C', dest, '-f', file])

0 commit comments

Comments
 (0)