small fixes

This commit is contained in:
Kirill Chernyshov 2019-10-07 12:44:15 +02:00
parent fcba246910
commit 4e58ffd645
No known key found for this signature in database
GPG Key ID: 425B3AB78FBCFBDB
5 changed files with 63 additions and 60 deletions

View File

@ -74,7 +74,7 @@ function installLeiningen(binScript, libFile, destinationFolder) {
fs.chmodSync(path.join(binDir, `lein${IS_WINDOWS ? '.bat' : ''}`), '0755');
yield io.mv(lib, path.join(libDir, `leiningen-standalone.jar`));
if (IS_WINDOWS) {
yield readWriteAsync(path.join(binDir, 'lein.bat'), '!LEIN_HOME!\self-installs\leiningen-!LEIN_VERSION!-standalone.jar', '..\libexec\leiningen-standalone.jar');
yield readWriteAsync(path.join(binDir, 'lein.bat'), '!LEIN_HOME!self-installsleiningen-!LEIN_VERSION!-standalone.jar', '..libexecleiningen-standalone.jar');
}
else {
yield readWriteAsync(path.join(binDir, 'lein'), '/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar', '../libexec/leiningen-standalone.jar');

View File

@ -20,6 +20,7 @@ const core = __importStar(require("@actions/core"));
const lein = __importStar(require("./leiningen"));
const boot = __importStar(require("./boot"));
const tdeps = __importStar(require("./tdeps"));
const IS_WINDOWS = process.platform === 'win32';
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@ -33,8 +34,13 @@ function run() {
boot.setup(Boot);
}
if (Tdeps) {
if (IS_WINDOWS) {
throw new Error('Windows is not supported yet');
}
else {
tdeps.setup(Tdeps);
}
}
if (!Boot && !Lein && !Tdeps) {
throw new Error('You must specify at least one clojure tool.');
}

View File

@ -25,9 +25,6 @@ const os = __importStar(require("os"));
const utils = __importStar(require("./utils"));
let tempDirectory = process.env['RUNNER_TEMP'] || '';
const IS_WINDOWS = process.platform === 'win32';
if (IS_WINDOWS) {
throw new Error('Windows is not supported yet.');
}
if (!tempDirectory) {
let baseLocation;
if (process.platform === 'darwin') {