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'
44function plugin ( options : plugin . Options ) : OutputOptions {
55 const binPath = path . join ( __dirname , '../bin' )
66
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 } `
912
1013 return {
1114 name : 'grpc-web' ,
You can’t perform that action at this time.
0 commit comments