Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit ef981ff

Browse files
committed
fix(plugins/plugin-ibmcloud): ibmcloud cos bind fails to resolve endpoint aliases
Fixes #6253
1 parent 679498f commit ef981ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/plugin-ibmcloud/cos/src/controller/endpoint.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function doGetCurrentEndpoint({ REPL }: Pick<Arguments, 'REPL'>): Promise<
4747
/** Talk to `ibmcloud` to set the COS endpoint to the given `endpoint` */
4848
async function doSetEndpoint({ REPL }: Pick<Arguments, 'REPL'>, endpoint: string) {
4949
const config = await readConfig({ REPL })
50-
config.endpointForKui = endpoint
50+
config.endpointForKui = shorthands[endpoint] || endpoint
5151

5252
await REPL.rexec<{ data: string }>(`fwrite ${encodeComponent(filepath())}`, {
5353
data: JSON.stringify(config, undefined, 2)
@@ -85,7 +85,7 @@ async function radiotable({ REPL }: Pick<Arguments, 'REPL'>): Promise<RadioTable
8585
export async function setEndpointIfPossible({ REPL }: Pick<Arguments, 'REPL'>): Promise<boolean> {
8686
const current = await doGetCurrentEndpoint({ REPL })
8787
if (current) {
88-
await doSetEndpoint({ REPL }, current)
88+
await doSetEndpoint({ REPL }, shorthands[current] || current)
8989
return true
9090
} else {
9191
return false

0 commit comments

Comments
 (0)