File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,20 @@ export async function selectWorkspaceFolder(): Promise<Uri> {
2323 if ( workspace . workspaceFolders && workspace . workspaceFolders . length > 0 ) {
2424 folder = workspace . workspaceFolders
2525 . filter ( ( value ) => {
26- let odoDevfileEnvFile = true ;
26+ let odoDevfile = true ;
2727 try {
28- odoDevfileEnvFile = ! fs
29- . statSync ( path . join ( value . uri . fsPath , '.odo' , 'env' , 'env.yaml' ) ) . isFile ( ) ;
28+ odoDevfile = ! fs . statSync ( path . join ( value . uri . fsPath , 'devfile.yaml' ) ) . isFile ( )
3029 } catch ( ignore ) {
3130 // ignore errors if file does not exist
3231 }
33- return odoDevfileEnvFile ;
32+ let odoDotDevfile = true ;
33+ try {
34+ odoDotDevfile = ! fs . statSync ( path . join ( value . uri . fsPath , '.devfile.yaml' ) ) . isFile ( ) ;
35+ } catch ( ignore ) {
36+ // ignore errors if file does not exist
37+ }
38+ // if there is no devfile.yaml and no .devfile.yaml in the root of workspace folder
39+ return ! odoDevfile && ! odoDotDevfile ;
3440 } )
3541 . map ( ( wsFolder ) => ( {
3642 label : `$(file-directory) ${ wsFolder . uri . fsPath } ` ,
You can’t perform that action at this time.
0 commit comments