mirror of
https://github.com/actions/setup-node.git
synced 2025-07-23 15:08:24 +02:00
Add support for node version codename
Refactored for optimization and maintainability
This commit is contained in:
parent
7a3ce83626
commit
62a25ae2c2
10 changed files with 507 additions and 401 deletions
|
@ -16,20 +16,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const installer = __importStar(require("./installer"));
|
||||
const auth = __importStar(require("./authutil"));
|
||||
const path = __importStar(require("path"));
|
||||
const auth = __importStar(require("./authutil"));
|
||||
const installer = __importStar(require("./installer"));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
//
|
||||
// Version is optional. If supplied, install / use from the tool cache
|
||||
// Version is optional. If supplied, install / use from the tool cache
|
||||
// If not supplied then task is still used to setup proxy, auth, etc...
|
||||
//
|
||||
let version = core.getInput('version');
|
||||
if (!version) {
|
||||
version = core.getInput('node-version');
|
||||
}
|
||||
const version = core.getInput('version') || core.getInput('node-version');
|
||||
// allow user to not specify a node version
|
||||
if (version) {
|
||||
// TODO: installer doesn't support proxy
|
||||
yield installer.getNode(version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue