Skip to content

Commit bb60706

Browse files
committed
Use D: drive as default work-dir
1 parent 9da2415 commit bb60706

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Parameters
2222
| ------------------- | -------------------------------------------- | -----------
2323
| platform | x86_64 | Install the x86 or x86\_64 version of Cygwin.
2424
| packages | *none* | List of additional packages to install.
25-
| install-dir | C:\cygwin | Installation directory (path overrides work-vol for install-dir)
25+
| install-dir | D:\cygwin | Installation directory (path overrides work-vol for install-dir)
2626
| site | http://mirrors.kernel.org/sourceware/cygwin/ | Mirror sites to install from, separated by whitespace
2727
| pubkeys | *none* | Absolute paths of extra public key files (RFC4880 format), separated by whitespace
2828
| check-sig | true | Whether to check the setup.ini signature
2929
| add-to-path | true | Whether to add Cygwin's `/bin` directory to the system `PATH`
3030
| allow-test-packages | false | Consider package versions marked test for installation
3131
| check-hash | true | Whether to check the hash of the downloaded Cygwin installer.
32-
| work-vol | C: | Volume on which to store \setup.exe, \cygwin-packages, \cygwin.
32+
| work-vol | D: | Volume on which to store \setup.exe, \cygwin-packages, \cygwin.
3333

3434
Line endings
3535
------------

Diff for: action.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ inputs:
1010
description: Packages to install
1111
required: false
1212
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)
1515
description: Installation directory (path overrides work-vol for install-dir)
1616
required: false
1717
default: ''
@@ -40,7 +40,7 @@ inputs:
4040
work-vol:
4141
description: Volume on which to store \setup.exe, \cygwin-packages, \cygwin
4242
required: false
43-
default: 'C:'
43+
default: ''
4444

4545
runs:
4646
using: "composite"
@@ -56,6 +56,9 @@ runs:
5656
exit 1
5757
}
5858
$vol = '${{ inputs.work-vol }}'
59+
if ("$vol" -eq '') {
60+
$vol = (Test-Path -LiteralPath 'D:\') ? 'D:' : 'C:'
61+
}
5962
$setupExe = "$vol\setup.exe"
6063
$setupFileName = "setup-$platform.exe"
6164
Invoke-WebRequest "https://cygwin.com/$setupFileName" -OutFile $setupExe
@@ -134,6 +137,12 @@ runs:
134137
# PowerShell wait for it to exit
135138
& $setupExe $args | Out-Default
136139
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+
137146
if ('${{ inputs.add-to-path }}' -eq $true) {
138147
echo "$installDir\bin" >> $env:GITHUB_PATH
139148
}

0 commit comments

Comments
 (0)