Skip to content

Commit 70430c3

Browse files
authored
Bugfix in module executable.lua on Windows (#450)
Now using 'vim.fn.exepath' to retrieve the correct value for the flutter executable, when using fvm on windows. Previously the plugin set the flutter executable to the UNIX script ("flutter") but Windows has its' own version ("flutter.bat").
1 parent 8199f8b commit 70430c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/flutter-tools/executable.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ local function _flutter_bin_from_fvm()
103103
local fvm_root =
104104
fs.dirname(fs.find(".fvm", { path = luv.cwd(), upward = true, type = "directory" })[1])
105105
local flutter_bin_symlink = path.join(fvm_root, ".fvm", "flutter_sdk", "bin", "flutter")
106+
flutter_bin_symlink = fn.exepath(flutter_bin_symlink)
106107
local flutter_bin = luv.fs_realpath(flutter_bin_symlink)
107108
if path.exists(flutter_bin_symlink) and path.exists(flutter_bin) then return flutter_bin end
108109
end

0 commit comments

Comments
 (0)