Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to shorten the release install path a bit #163

Merged
merged 1 commit into from
Oct 13, 2021
Merged
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: 6 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,12 @@ async function run() {

const input = parseInput();

const dest = path.join(tmp_dir, 'msys');
await io.mkdirP(dest);

let cachedInstall = false;
let instCache = null;
let msysRootDir = path.join('C:', 'msys64');
if (input.release) {
// Use upstream package instead of the default installation in the virtual environment.
msysRootDir = path.join(dest, 'msys64');
msysRootDir = path.join(tmp_dir, 'msys64');

if (INSTALL_CACHE_ENABLED) {
instCache = new InstallCache(msysRootDir, input);
Expand All @@ -225,16 +222,18 @@ async function run() {
let inst_dest = await downloadInstaller();

changeGroup('Extracting MSYS2...');
await exec.exec(inst_dest, ['-y'], {cwd: dest});
await exec.exec(inst_dest, ['-y'], {cwd: tmp_dir});

changeGroup('Disable Key Refresh...');
await disableKeyRefresh(msysRootDir);
core.endGroup();
}
}

writeWrapper(msysRootDir, input.pathtype, dest, 'msys2.cmd');
core.addPath(dest);
const pathDir = path.join(tmp_dir, 'setup-msys2');
await io.mkdirP(pathDir);
writeWrapper(msysRootDir, input.pathtype, pathDir, 'msys2.cmd');
core.addPath(pathDir);

core.exportVariable('MSYSTEM', input.msystem);

Expand Down