Skip to content

Commit 4ab5ecd

Browse files
committed
sbt-dotty: fix extension upgrade on Windows
When using --install-extension and an upgraded version of the extension exists online, the user normally gets a prompt to accept or reject the upgrade. Using --force we bypass this prompt and we also fix an issue with Windows where the prompt does not appear and we get the error "Unknown stdin file type" instead.
1 parent 94d70d4 commit 4ab5ecd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sbt-dotty/src/dotty/tools/sbtplugin/DottyIDEPlugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ object DottyIDEPlugin extends AutoPlugin {
197197
*/
198198
def installCodeExtension(codeCmd: Seq[String], name: String): Unit = {
199199
try {
200-
runProcess(codeCmd ++ Seq("--install-extension", name), wait = true)
200+
runProcess(codeCmd ++ Seq("--force", "--install-extension", name), wait = true)
201201
} catch {
202202
case e: Exception =>
203203
var alreadyInstalled: Boolean = false

0 commit comments

Comments
 (0)