Skip to content

Commit

Permalink
Improves shell detection error message (#1676)
Browse files Browse the repository at this point in the history
* Improves shell detection error message

* Edits

---------

Co-authored-by: Sebastian Tiedtke <[email protected]>
  • Loading branch information
pastuxso and sourishkrout authored Sep 20, 2024
1 parent c3fb2db commit 6b15df5
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/extension/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,18 @@ export class RunmeExtension {

if (kernel.hasExperimentEnabled('shellWarning', false)) {
const showUnsupportedShellMessage = async () => {
const showMore = 'Show more'

const answer = await window.showErrorMessage('Unsupported shell', showMore)
if (answer === showMore) {
const url = getDocsUrlFor('/r/extension/supported-shells')
const learnMore = 'Learn more'

TelemetryReporter.sendTelemetryEvent('extension.shellWarning')

const answer = await window.showWarningMessage(
'Your current shell has limited or no support.' +
' Please consider switching to sh, bash, or zsh.' +
' Click "Learn more" for additional resources.',
learnMore,
)
if (answer === learnMore) {
const url = getDocsUrlFor('/r/extension/unsupported-shell')
env.openExternal(Uri.parse(url))
}
}
Expand Down

0 comments on commit 6b15df5

Please sign in to comment.