From 93d8fee7fac0aa0ee856a35f2ca27f15ba54cc8c Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 13 Feb 2023 10:07:39 +0100 Subject: [PATCH] Skip Windows environment setup for dev builds. --- src/main.ts | 2 +- src/msvc.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index d0b779e..c873a7c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,7 +27,7 @@ async function run(): Promise { const enableNativeImageMusl = core.getInput(c.INPUT_NI_MUSL) === 'true' if (c.IS_WINDOWS) { - setUpWindowsEnvironment() + setUpWindowsEnvironment(graalvmVersion) } await setUpDependencies(components) if (enableNativeImageMusl) { diff --git a/src/msvc.ts b/src/msvc.ts index 87b688e..6850d89 100644 --- a/src/msvc.ts +++ b/src/msvc.ts @@ -1,6 +1,7 @@ import * as core from '@actions/core' import {execSync} from 'child_process' import {existsSync} from 'fs' +import {VERSION_DEV} from './constants' // Keep in sync with https://github.com/actions/virtual-environments const KNOWN_VISUAL_STUDIO_INSTALLATIONS = [ @@ -26,7 +27,11 @@ function findVcvarsallPath(): string { throw new Error('Failed to find vcvarsall.bat') } -export function setUpWindowsEnvironment(): void { +export function setUpWindowsEnvironment(graalVMVersion: string): void { + if (graalVMVersion === VERSION_DEV) { + return // no longer required in dev builds + } + core.startGroup('Updating Windows environment...') const vcvarsallPath = findVcvarsallPath()