Browse Source

fix: await auth.set to prevent race condition when setting API key (#8075)

Darsh Patel 1 month ago
parent
commit
bf37a88f7f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx

+ 1 - 1
packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx

@@ -225,7 +225,7 @@ function ApiMethod(props: ApiMethodProps) {
       }
       }
       onConfirm={async (value) => {
       onConfirm={async (value) => {
         if (!value) return
         if (!value) return
-        sdk.client.auth.set({
+        await sdk.client.auth.set({
           providerID: props.providerID,
           providerID: props.providerID,
           auth: {
           auth: {
             type: "api",
             type: "api",