File tree 1 file changed +13
-2
lines changed
sbt-dotty/src/dotty/tools/sbtplugin
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -234,8 +234,19 @@ object DottyIDEPlugin extends AutoPlugin {
234
234
},
235
235
236
236
runCode := {
237
- runProcess(codeCommand.value ++ Seq (" --install-extension" , " lampepfl.dotty" ), wait = true )
238
- runProcess(codeCommand.value ++ Seq (" ." ), directory = baseDirectory.value)
237
+ try {
238
+ runProcess(codeCommand.value ++ Seq (" --install-extension" , " lampepfl.dotty" ), wait = true )
239
+ runProcess(codeCommand.value ++ Seq (" ." ), directory = baseDirectory.value)
240
+ } catch {
241
+ case ioex : IOException if ioex.getMessage.startsWith(""" Cannot run program "code"""" ) =>
242
+ throw new MessageOnlyException (
243
+ """ Could not find Visual Studio Code on your system.
244
+ |Please download it at (https://code.visualstudio.com/) and add it to your path and then rerun launchIDE
245
+ |
246
+ |For Linux: https://code.visualstudio.com/docs/setup/linux
247
+ |For Windows: https://code.visualstudio.com/docs/setup/windows
248
+ |For Mac: https://code.visualstudio.com/docs/setup/mac""" .stripMargin)
249
+ }
239
250
}
240
251
241
252
) ++ addCommandAlias(" launchIDE" , " ;configureIDE;runCode" )
You can’t perform that action at this time.
0 commit comments