mirror of
https://github.com/actions/setup-go.git
synced 2025-07-24 23:48:28 +02:00
Add default value if arch is null
This commit is contained in:
parent
1776f915f8
commit
61dd67fbf5
2 changed files with 6 additions and 2 deletions
|
@ -7,6 +7,7 @@ import {restoreCache} from './cache-restore';
|
|||
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
|
||||
import cp from 'child_process';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
|
||||
export async function run() {
|
||||
try {
|
||||
|
@ -19,7 +20,8 @@ export async function run() {
|
|||
const cache = core.getBooleanInput('cache');
|
||||
core.info(`Setup go version spec ${versionSpec}`);
|
||||
|
||||
const arch = core.getInput('architecture');
|
||||
let arch = core.getInput('architecture');
|
||||
arch = arch ? arch : os.arch();
|
||||
|
||||
if (versionSpec) {
|
||||
let token = core.getInput('token');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue