VirtusLab / besom

Besom - a Pulumi SDK for Scala. Also, incidentally, a broom made of twigs tied round a stick. Brooms and besoms are used for protection, to ward off evil spirits, and cleansing of ritual spaces.
https://virtuslab.github.io/besom/
Apache License 2.0
114 stars 7 forks source link

Provide the actionable error message from lang host on wrong runtime #406

Open pawelprazak opened 4 months ago

pawelprazak commented 4 months ago

Currently the user gets error like this, when the lang host cannot find what it needs (runtime: scala when the code is nodejs).

Previewing update (dev):
     Type                 Name               Plan     Info
     pulumi:pulumi:Stack  issue-karol-2-dev           1 error; 1 message
Diagnostics:
  pulumi:pulumi:Stack (issue-karol-2-dev):
    [error]  No main class found
    error: an unhandled error occurred: '/opt/homebrew/bin/scala-cli /opt/homebrew/bin/scala-cli run .' exited with non-zero exit code: 1

It would be awesome to provide the user with actionable error message.