Skip to content

Commit

Permalink
Avoiding notification when there is no runner
Browse files Browse the repository at this point in the history
  • Loading branch information
pastuxso committed Aug 28, 2024
1 parent 32a8613 commit 02c3561
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/extension/executors/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ export const aws: IKernelExecutor = async (executor) => {
break
}

const profile = await kernel.runProgram(programOptions)
let profile = ''
const result = await kernel.runProgram(programOptions)

if (result) {
profile = result
}

credentials = fromIni({ profile })

switch (awsResolver.view) {
Expand Down
4 changes: 4 additions & 0 deletions src/extension/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ export class RunmeExtension {
kernel
.runProgram('echo $SHELL')
.then((output) => {
if (output === false) {
return
}

const supportedShells = ['bash', 'zsh']
const isSupported = supportedShells.some((sh) => output?.includes(sh))
logger.info(`Shell: ${output}`)
Expand Down
2 changes: 1 addition & 1 deletion src/extension/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ export class Kernel implements Disposable {

if (!this.runner) {
logger.error('No runner available')
return
return false
}

if (typeof program === 'object') {
Expand Down

0 comments on commit 02c3561

Please sign in to comment.