File tree Expand file tree Collapse file tree 3 files changed +61
-6
lines changed Expand file tree Collapse file tree 3 files changed +61
-6
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ jobs:
114
114
with :
115
115
install-dir : " ${{ matrix.install-dir }}"
116
116
117
- - name : Check working directory
117
+ - name : Check install directory
118
118
run : |
119
119
if [[ "$(cygpath -aw /)" == '${{ matrix.install-dir }}' ]]; then
120
120
echo "Installed in $(cygpath -aw /)"
@@ -133,6 +133,31 @@ jobs:
133
133
env :
134
134
SHELLOPTS : igncr
135
135
136
+ symlink-test :
137
+ runs-on : windows-latest
138
+ name : ' Check symlink type control'
139
+
140
+ strategy :
141
+ matrix :
142
+ include :
143
+ - symlink-type : native
144
+ - symlink-type : sys
145
+ - symlink-type : wsl
146
+
147
+ env :
148
+ CYGWIN : winsymlinks:${{ matrix.symlink-type }}
149
+
150
+ steps :
151
+ - run : git config --global core.autocrlf input
152
+
153
+ - uses : actions/checkout@v2
154
+
155
+ - name : Install Cygwin
156
+ uses : ./
157
+
158
+ - name : Check symlink
159
+ run : bash tests/symlink.sh
160
+
136
161
time-machine :
137
162
runs-on : windows-latest
138
163
strategy :
Original file line number Diff line number Diff line change 72
72
Symlinks
73
73
--------
74
74
75
- Unfortunately, Cygwin's ` setup ` doesn't (currently) honour
76
- ` CYGWIN=winsymlinks:native ` or offer an option to control the kind of symlinks
77
- created, so some executables (e.g. ` python ` ) are created as Cygwin-style
78
- symlinks. Since CMD and PowerShell don't understand those symlinks, you cannot
79
- run those executables directly in a ` run: ` in your workflow. Execute them via
75
+ Cygwin's ` setup ` creates Cygwin-style symlinks by default, and some
76
+ executables (e.g. ` python ` ) are symlinks.
77
+
78
+ Since CMD and PowerShell don't understand those symlinks, you cannot run
79
+ those executables directly in a ` run: ` in your workflow. Execute them via
80
80
` bash ` or ` env ` instead.
81
81
82
+ Alternatively, putting e.g. ` CYGWIN=winsymlinks:native ` into the workflow's
83
+ environment works, since setup now honours that.
84
+
82
85
Mirrors and signatures
83
86
----------------------
84
87
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+
3
+ TEST_FILE=" /usr/bin/apropos"
4
+ echo " cygpath -w ${TEST_FILE} returns $( cygpath -w ${TEST_FILE} ) "
5
+ # don't convert using cygpath -w, as that canonicalizes symlinks ?!?
6
+ TEST_FILE_W=" C:\cygwin\bin\apropos"
7
+
8
+ # check the symlink we're going to do checks on exists
9
+ if [ ! -L ${TEST_FILE} ]; then
10
+ echo " This test assumes ${TEST_FILE} exists and is a symlink"
11
+ exit 1
12
+ fi
13
+
14
+ # check the symlink was created in the way expected
15
+ case ${CYGWIN} in
16
+ * sys* )
17
+ cmd /c " dir /AS ${TEST_FILE_W} " | grep " 21"
18
+ ;;
19
+
20
+ * native* )
21
+ cmd /c " dir /AL ${TEST_FILE_W} " | grep " <SYMLINK>"
22
+ ;;
23
+
24
+ * wsl* )
25
+ fsutil reparsepoint query ${TEST_FILE_W} | grep " 0xa000001d"
26
+ ;;
27
+ esac
You can’t perform that action at this time.
0 commit comments