File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -215,21 +215,21 @@ private static void KillFunctionHostProcesses()
215215 private static string GetEnvPathForFunctionTools ( )
216216 {
217217 string exePath ;
218- if ( OperatingSystem . IsWindows ( ) )
218+ if ( OperatingSystem . IsWindows ( ) )
219219 {
220220 var enviromentPath = Environment . GetEnvironmentVariable ( "PATH" , EnvironmentVariableTarget . Machine ) ;
221- exePath = enviromentPath . Split ( ';' ) . Select ( x => Path . Combine ( x , "func.exe" ) ) . Where ( x => File . Exists ( x ) ) . FirstOrDefault ( ) ;
221+ exePath = enviromentPath . Split ( Path . PathSeparator ) . Select ( x => Path . Combine ( x , "func.exe" ) ) . Where ( x => File . Exists ( x ) ) . FirstOrDefault ( ) ;
222222 }
223223 else
224224 {
225225 var enviromentPath = Environment . GetEnvironmentVariable ( "PATH" ) ;
226- exePath = enviromentPath . Split ( ':' ) . Select ( x => Path . Combine ( x , "func" ) ) . Where ( x => File . Exists ( x ) ) . FirstOrDefault ( ) ;
226+ exePath = enviromentPath . Split ( Path . PathSeparator ) . Select ( x => Path . Combine ( x , "func" ) ) . Where ( x => File . Exists ( x ) ) . FirstOrDefault ( ) ;
227227 }
228228
229- if ( ! string . IsNullOrWhiteSpace ( exePath ) )
229+ if ( ! string . IsNullOrWhiteSpace ( exePathWithExtension ) )
230230 {
231- Console . WriteLine ( $ "Path for Azure Function Core tools: { exePath } ") ;
232- return exePath ;
231+ Console . WriteLine ( $ "Path for Azure Function Core tools: { exePathWithExtension } ") ;
232+ return exePathWithExtension ;
233233 }
234234 else
235235 {
You can’t perform that action at this time.
0 commit comments