Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,13 @@ async function run() {
core.setFailed('environment variable RUNNER_TEMP is undefined');
return;
}
const dest = path.join(tmp_dir, 'msys');

await io.mkdirP(dest);

const distrib = await tc.downloadTool('http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz');

await exec.exec(`tar`, [
'-x', '-J', '--force-local',
// For some reason, GNU Tar on Windows expects paths to be slash-separated
'-C', dest.replace(/\\/g, '/'),
'-f', distrib
]);
const dest = path.join(tmp_dir, 'msys');
await io.mkdirP(dest);

await tc.extractTar(distrib, dest);

let cmd = path.join(dest, 'msys2do.cmd');
fs.writeFileSync(cmd, [
Expand Down