Skip to content

Commit 9610564

Browse files
authored
feat(cloud9): always add default region #2717
Problem: On Cloud9, changing credentials is uncommon, while _new_ environments _are_ common. Showing a prompt to ask about adding a region to AWS Explorer is noisy. Solution: On Cloud9, add the credentials-default region to AWS Explorer without prompting.
1 parent 81ef026 commit 9610564

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/awsexplorer/defaultRegion.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { AwsContext } from '../shared/awsContext'
1111
import * as localizedText from '../shared/localizedText'
1212
import { createQuickPick, promptUser } from '../shared/ui/picker'
1313
import { AwsExplorer } from './awsExplorer'
14-
import { getIdeProperties } from '../shared/extensionUtilities'
14+
import { getIdeProperties, isCloud9 } from '../shared/extensionUtilities'
1515
import { PromptSettings } from '../shared/settings'
1616

1717
class RegionMissingUI {
@@ -35,6 +35,12 @@ export async function checkExplorerForDefaultRegion(
3535
return
3636
}
3737

38+
if (isCloud9()) {
39+
await awsContext.addExplorerRegion(profileRegion)
40+
awsExplorer.refresh()
41+
return
42+
}
43+
3844
const shouldPrompt = await PromptSettings.instance.isPromptEnabled('regionAddAutomatically')
3945
if (!shouldPrompt) {
4046
return

0 commit comments

Comments
 (0)