Skip to content

Commit 871a054

Browse files
committed
fix(fvm/windows): append '.bat' extention to flutter path
1 parent 8edcdab commit 871a054

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/flutter-tools/executable.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ end
102102
local function _flutter_bin_from_fvm()
103103
local fvm_root =
104104
fs.dirname(fs.find(".fvm", { path = luv.cwd(), upward = true, type = "directory" })[1])
105-
local flutter_bin_symlink = path.join(fvm_root, ".fvm", "flutter_sdk", "bin", "flutter")
105+
local binary_name = path.is_windows and "flutter.bat" or "flutter"
106+
local flutter_bin_symlink = path.join(fvm_root, ".fvm", "flutter_sdk", "bin", binary_name)
106107
flutter_bin_symlink = fn.exepath(flutter_bin_symlink)
107108
local flutter_bin = luv.fs_realpath(flutter_bin_symlink)
108109
if path.exists(flutter_bin_symlink) and path.exists(flutter_bin) then return flutter_bin end

0 commit comments

Comments
 (0)