File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,12 @@ export class ToolsConfig {
9191
9292 public static async selectTool ( locations : string [ ] , versionRange : string ) : Promise < string > {
9393 let result : string ;
94+ const funcValue = Platform . OS !== 'win32' ? 'func' : 'func.exe' ;
9495 // Array.find cannot be used here because of async calls
9596 for ( const location of locations ) {
9697 // FIXME: see https://github.com/knative/func/issues/2067
9798 // eslint-disable-next-line no-await-in-loop
98- if ( location && ( location . endsWith ( 'func' ) || semver . satisfies ( await ToolsConfig . getVersion ( location ) , versionRange ) ) ) {
99+ if ( location && ( location . endsWith ( funcValue ) || semver . satisfies ( await ToolsConfig . getVersion ( location ) , versionRange ) ) ) {
99100 result = location ;
100101 break ;
101102 }
You can’t perform that action at this time.
0 commit comments