File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ import * as path from 'path'
4
4
function plugin ( options : plugin . Options ) : OutputOptions {
5
5
const binPath = path . join ( __dirname , '../bin' )
6
6
7
- if ( ! ( process . env . Path && process . env . Path . indexOf ( binPath ) !== - 1 ) )
8
- process . env . Path = ( process . env . Path ?? '' ) + `${ process . env . Path && ! process . env . Path . endsWith ( ';' ) ? ';' : '' } ${ binPath } `
7
+ const envPathSep = process . platform === 'win32' ? ';' : ':'
8
+ const envPathName = process . platform === 'win32' ? 'Path' : 'PATH'
9
+
10
+ if ( ! ( process . env [ envPathName ] && process . env [ envPathName ] ?. indexOf ( binPath ) !== - 1 ) )
11
+ process . env [ envPathName ] = ( process . env [ envPathName ] ?? '' ) + `${ process . env [ envPathName ] && ! process . env [ envPathName ] ?. endsWith ( envPathSep ) ? envPathSep : '' } ${ binPath } `
9
12
10
13
return {
11
14
name : 'grpc-web' ,
You can’t perform that action at this time.
0 commit comments