File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ FLUTTER_ROOT environment variable."
9696
9797(defun lsp-dart-pub-command ()
9898 " Return the pub executable path from Dart SDK path."
99+ (if (eq system-type 'windows-nt )
100+ (expand-file-name " bin/pub.bat" (lsp-dart-get-sdk-dir)))
99101 (expand-file-name " bin/pub" (lsp-dart-get-sdk-dir)))
100102
101103(defun lsp-dart-pub-snapshot-command ()
@@ -104,14 +106,16 @@ FLUTTER_ROOT environment variable."
104106
105107(defun lsp-dart-dart-command ()
106108 " Return the dart executable from Dart SDK dir."
107- (let ((command (expand-file-name " bin/dart" (lsp-dart-get-sdk-dir))))
109+ (let* ((executable-path (if (eq system-type 'windows-nt ) " bin/dart.exe" " bin/dart" ))
110+ (command (expand-file-name executable-path (lsp-dart-get-sdk-dir))))
108111 (if (file-exists-p command)
109112 command
110113 (lsp-dart-log " Dart command not found in path '%s'" command))))
111114
112115(defun lsp-dart-flutter-command ()
113116 " Return the flutter executable from Flutter SDK dir."
114- (let ((command (expand-file-name " bin/flutter" (lsp-dart-get-flutter-sdk-dir))))
117+ (let* ((executable-path (if (eq system-type 'windows-nt ) " bin/flutter.bat" " bin/flutter" ))
118+ (command (expand-file-name executable-path (lsp-dart-get-flutter-sdk-dir))))
115119 (if (file-exists-p command)
116120 command
117121 (lsp-dart-log " Flutter command not found in path '%s'" command))))
You can’t perform that action at this time.
0 commit comments