We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0d3a44c + 5abb668 commit 0b979a2Copy full SHA for 0b979a2
src/recommendation/openShiftToolkit.ts
@@ -16,9 +16,13 @@ const RECOMMENDATION_MESSAGE = `The workspace has a devfile.yaml. Install [OpenS
16
const YAML_RECOMMENDATIONS_SHOW = 'yaml.recommendations.show';
17
18
function isDevfileYAML(uri: vscode.Uri): boolean {
19
- if (fs.lstatSync(uri.fsPath).isDirectory()) {
20
- const devFileYamlPath = path.join(uri.fsPath, 'devfile.yaml');
21
- return fs.existsSync(devFileYamlPath);
+ try {
+ if (fs.lstatSync(uri.fsPath).isDirectory()) {
+ const devFileYamlPath = path.join(uri.fsPath, 'devfile.yaml');
22
+ return fs.existsSync(devFileYamlPath);
23
+ }
24
+ } catch (error) {
25
+ return false;
26
}
27
return !!uri.path && path.basename(uri.path).toLowerCase() === 'devfile.yaml';
28
0 commit comments