File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 42
42
perl-version : " 5.30.0"
43
43
distribution : ${{ matrix.dist }}
44
44
- run : perl -V
45
+ - run : gcc --version
45
46
46
47
- run : npm run format-check
Original file line number Diff line number Diff line change @@ -205,10 +205,15 @@ export async function getPerl(version: string) {
205
205
core . debug ( 'Perl tool is cached under ' + toolPath ) ;
206
206
}
207
207
208
- const perlPath = path . join ( toolPath , 'perl' , 'bin' ) ;
209
- const cPath = path . join ( toolPath , 'c' , 'bin' ) ;
210
- core . addPath ( perlPath ) ;
211
- core . addPath ( cPath ) ; // for gcc-mingw bundled with strawberry perl
208
+ // remove pre-installed Strawberry Perl and MinGW from Path
209
+ let pathEnv = ( process . env . PATH || '' ) . split ( path . delimiter ) ;
210
+ pathEnv = pathEnv . filter ( p => ! p . match ( / .* (?: S t r a w b e r r y | m i n g w ) .* / i) ) ;
211
+
212
+ // add our new Strawberry Portable Perl Paths
213
+ pathEnv . unshift ( path . join ( toolPath , 'site' , 'bin' ) ) ;
214
+ pathEnv . unshift ( path . join ( toolPath , 'c' , 'bin' ) ) ;
215
+ pathEnv . unshift ( path . join ( toolPath , 'perl' , 'bin' ) ) ;
216
+ core . exportVariable ( 'PATH' , pathEnv . join ( path . delimiter ) ) ;
212
217
}
213
218
214
219
async function acquirePerl ( version : PerlVersion ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments