Fix bug. Add workflows.
This commit is contained in:
@@ -20,7 +20,7 @@ const exec = __importStar(require("@actions/exec"));
|
||||
const tc = __importStar(require("@actions/tool-cache"));
|
||||
const path = __importStar(require("path"));
|
||||
const IS_WINDOWS = process.platform === 'win32';
|
||||
function default_1(version) {
|
||||
function findRubyVersion(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const installDir = tc.find('Ruby', version);
|
||||
if (!installDir) {
|
||||
@@ -37,4 +37,4 @@ function default_1(version) {
|
||||
core.addPath(toolPath);
|
||||
});
|
||||
}
|
||||
exports.default = default_1;
|
||||
exports.findRubyVersion = findRubyVersion;
|
||||
|
||||
@@ -14,17 +14,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const installer_1 = __importDefault(require("./installer"));
|
||||
const installer_1 = require("./installer");
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const version = core.getInput('version');
|
||||
yield installer_1.default(version);
|
||||
yield installer_1.findRubyVersion(version);
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
||||
Reference in New Issue
Block a user