From cbb3d26dcdd2286997f73857f8f20be5c7eecd0d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 17 Oct 2023 18:07:52 +0000 Subject: [PATCH] feat(dotenv-linter): auto-install MSVC --- dotenv-linter/install.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dotenv-linter/install.ps1 b/dotenv-linter/install.ps1 index d1bba14..2c53297 100644 --- a/dotenv-linter/install.ps1 +++ b/dotenv-linter/install.ps1 @@ -18,8 +18,15 @@ $pkg_src = "$pkg_src_cmd" New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" +# Fetch MSVC Runtime +echo "Checking for MSVC Runtime..." +IF (-not (Test-Path "\Windows\System32\vcruntime140.dll")) +{ + & "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" vcruntime +} + # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) +IF (!(Test-Path -Path "$pkg_download")) { echo "Downloading dotenv-linter from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"