File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,11 @@ Used by features that needs to know project entrypoint like DAP support."
9090 (eq lsp-dart--project-type-cache 'flutter )
9191 (let ((flutter-project? (or (-when-let (pubspec-path (-some->> (lsp-dart-get-project-root)
9292 (expand-file-name " pubspec.yaml" )))
93- (with-temp-buffer
94- (insert-file-contents (-some->> (lsp-dart-get-project-root) (expand-file-name " pubspec.yaml" )))
95- (goto-char (point-min ))
96- (re-search-forward " sdk\s *:\s *flutter" nil t )))
93+ (when (file-exists-p pubspec-path)
94+ (with-temp-buffer
95+ (insert-file-contents (-some->> (lsp-dart-get-project-root) (expand-file-name " pubspec.yaml" )))
96+ (goto-char (point-min ))
97+ (re-search-forward " sdk\s *:\s *flutter" nil t ))))
9798 (lsp-dart--flutter-repo-p))))
9899 (lsp-dart--set-project-type-cache flutter-project?)
99100 flutter-project?) ))
You can’t perform that action at this time.
0 commit comments