Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lua/flutter-tools/dev_tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ end

---@param url string
local function open_dev_tools(url)
local open_command = utils.open_command()
local open_command, args = utils.open_command()
if not open_command then
return ui.notify(
"Sorry your Operating System is not supported, please raise an issue",
ui.ERROR
)
end

table.insert(args, url)
Job:new({
command = open_command,
args = { url },
args = args,
detached = true,
}):start()
end
Expand Down
6 changes: 3 additions & 3 deletions lua/flutter-tools/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ function M.get_hl(name, attribute)
end

function M.open_command()
if path.is_mac then return "open" end
if path.is_linux then return "xdg-open" end
if path.is_windows then return "explorer" end
if path.is_mac then return "open", {} end
if path.is_linux then return "xdg-open", {} end
if path.is_windows then return "cmd.exe", { "/c", "start" } end
return nil, nil
end

Expand Down
Loading