emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dart-mode 9ad52e8 158/192: Search for sdk from flutter if


From: ELPA Syncer
Subject: [nongnu] elpa/dart-mode 9ad52e8 158/192: Search for sdk from flutter if no dart on path
Date: Sun, 29 Aug 2021 11:02:09 -0400 (EDT)

branch: elpa/dart-mode
commit 9ad52e862d6e795ffe1b63eae587fae04ab25b88
Author: Brady Trainor <mail@bradyt.com>
Commit: Brady Trainor <mail@bradyt.com>

    Search for sdk from flutter if no dart on path
---
 dart-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dart-mode.el b/dart-mode.el
index 1bbdb61..79eea39 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -265,7 +265,11 @@ Only set in `dart-popup-mode'.")
 (defcustom dart-sdk-path
   ;; Use Platform.resolvedExecutable so that this logic works through symlinks
   ;; and wrapper scripts.
-  (-when-let (dart (executable-find "dart"))
+  (-when-let (dart (or (executable-find "dart")
+                       (let ((flutter (executable-find "flutter")))
+                         (when flutter
+                           (expand-file-name "cache/dart-sdk/bin/dart"
+                                             (file-name-directory flutter))))))
     (dart--with-temp-file input
       (with-temp-file input (insert "
         import 'dart:io';



reply via email to

[Prev in Thread] Current Thread [Next in Thread]