@@ -967,11 +967,11 @@ function setup(version, githubAuth) {
967967 const binScripts = [];
968968 if (isWindows) {
969969 for (const ext of ['ps1', 'bat']) {
970- binScripts.push(yield tc.downloadTool(`https://raw.githubusercontent.com/technomancy/leiningen/${version === 'latest' ? 'stable' : version}/bin/lein.${ext}`, undefined , githubAuth));
970+ binScripts.push(yield tc.downloadTool(`https://raw.githubusercontent.com/technomancy/leiningen/${version === 'latest' ? 'stable' : version}/bin/lein.${ext}`, path.join(utils.getTempDir(), `lein.${ext}`) , githubAuth));
971971 }
972972 }
973973 else {
974- binScripts.push(yield tc.downloadTool(`https://raw.githubusercontent.com/technomancy/leiningen/${version === 'latest' ? 'stable' : version}/bin/lein`, undefined , githubAuth));
974+ binScripts.push(yield tc.downloadTool(`https://raw.githubusercontent.com/technomancy/leiningen/${version === 'latest' ? 'stable' : version}/bin/lein`, path.join(utils.getTempDir(), 'lein') , githubAuth));
975975 }
976976 const tempDir = path.join(utils.getTempDir(), `temp_${Math.floor(Math.random() * 2000000000)}`);
977977 const leiningenDir = yield installLeiningen(binScripts, tempDir);
@@ -993,9 +993,9 @@ function installLeiningen(binScripts, destinationFolder) {
993993 if (binStats.isFile()) {
994994 const binDir = path.join(destinationFolder, 'leiningen', 'bin');
995995 yield io.mkdirP(binDir);
996- yield io.mv(bin, path.join(binDir, `lein${isWindows ? '.ps1' : '' }`));
996+ yield io.mv(bin, path.join(binDir, `${path.basename(bin) }`));
997997 if (!isWindows) {
998- yield fs.chmod(path.join(binDir, ` lein` ), '0755');
998+ yield fs.chmod(path.join(binDir, ' lein' ), '0755');
999999 }
10001000 }
10011001 else {
0 commit comments