-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathinstall.ps1
More file actions
26 lines (21 loc) · 888 Bytes
/
Copy pathinstall.ps1
File metadata and controls
26 lines (21 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<#
.SYNOPSIS
Apply the Java winget DSC configuration on Windows.
.DESCRIPTION
This script is a thin CI/dev shim. The core artifact for the Java flow is
`configuration.winget` in this directory - a winget DSC configuration that
declaratively installs the Microsoft Build of OpenJDK 25 (LTS) via winget.
The shim exists only to:
* apply the DSC config with retry (hosted-runner networks are flaky),
* rehydrate PATH in the current session so later CI steps see `java`,
* verify `java` and `javac` resolve, and
* emit `INSTALL_OK: java` for the test harness.
#>
[CmdletBinding()]
param()
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest
& (Join-Path $PSScriptRoot '..\_common\apply-configuration.ps1') `
-Id 'java' `
-ConfigFile (Join-Path $PSScriptRoot 'configuration.winget') `
-RequireCommands @('java', 'javac')