Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commite8956e5
committed
Run Cygwin CI workflow commands in login shells
This passes --login to the bash shell used to run commands in theCygwin environment on CI. This eliminates the need to work around apartly broken environment, and the extra code what was used to dothat is accordingly removed. There are two benefits of this change:- The PATH is correct: Cygwin's /usr/local/bin and /usr/bin are present at the beginning of PATH. Otherwise, it is easy to get /usr/bin at the front, but rather involved to get /usr/local/bin to precede it. Because Python on Cygwin puts scripts/executables such as the upgraded "pip" and the "pytest" command in /usr/local/bin, it is valuable to have that directory in the PATH and best to have it before /usr/bin. (I have set CYGWIN_NOWINPATH to omit other directories, since finding any of the commands to be run in the Cygwin environment outside that environment is unintended.)- Every step automatically has correct temporary directories: When Cygwin commands were not being run in login shells, they didn't automatically get correct values for TMP and TEMP for their environment. To work around this, those environment variables were set globally, for every step. But that caused them to refer to nonexistent locations for steps such as actions/checkout. Most likely this would not cause any errors, but it did cause copious warnings about a nonexistent temporary directory, which risked obscuring other potentially important output. Now that Cygwin commands run in login shells, both the few non-Cygwin steps, and the steps run in the Cygwin enviroment, all get correct temporary directories (with TMP and TEMP set in the prewritten startup script the login shell uses).A theoretical disadvantage of this is that login shells takeslightly longer to start up, but that delay is insigificant inthis application. A more significant disadvantage is that settingthe -x shell option the way it was done before would produce a lotof noise at the beginning of the output for every command-runningstep. To work around that, -x is omitted from the value of "shell"and "set -x" is added at the end of the startup script for loginshells, so it runs before each step's "payload" command, butwithout applying to the commands run in the startup script itself.1 parent10e2960 commite8956e5
1 file changed
+15
-9
lines changedLines changed: 15 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
14 |
| - | |
15 |
| - | |
| 13 | + | |
| 14 | + | |
16 | 15 |
| |
17 | 16 |
| |
18 | 17 |
| |
19 |
| - | |
| 18 | + | |
20 | 19 |
| |
21 | 20 |
| |
22 | 21 |
| |
23 | 22 |
| |
24 | 23 |
| |
25 |
| - | |
| 24 | + | |
26 | 25 |
| |
27 | 26 |
| |
28 | 27 |
| |
29 | 28 |
| |
30 | 29 |
| |
31 | 30 |
| |
32 |
| - | |
| 31 | + | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
| 35 | + | |
35 | 36 |
| |
36 |
| - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 |
| |
38 | 44 |
| |
39 | 45 |
| |
| |||
57 | 63 |
| |
58 | 64 |
| |
59 | 65 |
| |
60 |
| - | |
| 66 | + | |
61 | 67 |
| |
62 | 68 |
| |
63 | 69 |
| |
| |||
71 | 77 |
| |
72 | 78 |
| |
73 | 79 |
| |
74 |
| - | |
| 80 | + |
0 commit comments
Comments
(0)