@@ -10,8 +10,8 @@ inputs:
10
10
description : Packages to install
11
11
required : false
12
12
install-dir :
13
- # by default , install to C :\cygwin rather than the platform dependent
14
- # default to make everything simpler
13
+ # For consistency and simplicity , install to <work-dir> :\cygwin rather
14
+ # than to the platform dependent default (e.g. <work-dir>:\cygwin64)
15
15
description : Installation directory (path overrides work-vol for install-dir)
16
16
required : false
17
17
default : ' '
@@ -40,7 +40,7 @@ inputs:
40
40
work-vol :
41
41
description : Volume on which to store \setup.exe, \cygwin-packages, \cygwin
42
42
required : false
43
- default : ' C: '
43
+ default : ' '
44
44
45
45
runs :
46
46
using : " composite"
56
56
exit 1
57
57
}
58
58
$vol = '${{ inputs.work-vol }}'
59
+ if ("$vol" -eq '') {
60
+ $vol = (Test-Path -LiteralPath 'D:\') ? 'D:' : 'C:'
61
+ }
59
62
$setupExe = "$vol\setup.exe"
60
63
$setupFileName = "setup-$platform.exe"
61
64
Invoke-WebRequest "https://cygwin.com/$setupFileName" -OutFile $setupExe
@@ -134,6 +137,12 @@ runs:
134
137
# PowerShell wait for it to exit
135
138
& $setupExe $args | Out-Default
136
139
140
+ if ('${{ inputs.work-vol }}' -eq '' && '${{ inputs.install-dir }}' -eq '') {
141
+ # compatibility symlink (not tested: might try hard link or junction)
142
+ cmd /c mklink /d C:\cygwin $installDir
143
+ #New-Item -Path C:\cygwin -ItemType SymbolicLink -Value $installDir
144
+ }
145
+
137
146
if ('${{ inputs.add-to-path }}' -eq $true) {
138
147
echo "$installDir\bin" >> $env:GITHUB_PATH
139
148
}
0 commit comments