add support for arm64 Windows

This commit is contained in:
Dmitry Shibanov 2023-12-20 16:52:29 +01:00
parent b39b52d121
commit 026d4a4820
6 changed files with 63 additions and 14 deletions

View file

@ -1,5 +1,6 @@
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as io from '@actions/io';
export function parseNodeVersionFile(contents: string): string | null {
let nodeVersion: string | undefined;
@ -44,9 +45,9 @@ export function parseNodeVersionFile(contents: string): string | null {
export async function printEnvDetailsAndSetOutput() {
core.startGroup('Environment details');
const promises = ['node', 'npm', 'yarn'].map(async tool => {
const output = await getToolVersion(tool, ['--version']);
const pathTool = await io.which(tool, false);
const output = pathTool ? await getToolVersion(tool, ['--version']) : '';
return {tool, output};
});