From 573196b9d9969130fba7ae821c28b9a6ea698b67 Mon Sep 17 00:00:00 2001 From: Zhiming Ma Date: Mon, 23 Oct 2023 12:42:15 +0800 Subject: [PATCH] fix(clients): fix vim & intellij plugin to run node with prefer ipv4 options. (#615) --- .../src/main/kotlin/com/tabbyml/intellijtabby/agent/Agent.kt | 3 ++- clients/vim/autoload/tabby.vim | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/agent/Agent.kt b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/agent/Agent.kt index bddfe86..b56e53c 100644 --- a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/agent/Agent.kt +++ b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/agent/Agent.kt @@ -64,7 +64,8 @@ class Agent : ProcessAdapter() { fun open() { val node = getNodeBinary() val script = getNodeScript() - val cmd = GeneralCommandLine(node.absolutePath, script.absolutePath) + val options = "--dns-result-order=ipv4first" + val cmd = GeneralCommandLine(node.absolutePath, options, script.absolutePath) process = object : KillableProcessHandler(cmd) { override fun readerOptions(): BaseOutputReader.Options { return BaseOutputReader.Options.forMostlySilentProcess() diff --git a/clients/vim/autoload/tabby.vim b/clients/vim/autoload/tabby.vim index 2049816..e80b33a 100644 --- a/clients/vim/autoload/tabby.vim +++ b/clients/vim/autoload/tabby.vim @@ -83,7 +83,7 @@ function! tabby#OnVimEnter() return endif - let command = node_binary . ' ' . g:tabby_node_script + let command = node_binary . ' --dns-result-order=ipv4first ' . g:tabby_node_script call tabby#agent#Open(command) call tabby#keybindings#Map()