Skip to content

Commit

Permalink
handle client/next already specified (#1566)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemmiillyy authored Sep 4, 2024
1 parent 64f1028 commit eed3363
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lucky-tigers-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@xata.io/cli': patch
---

Fix overriding client version to latest with Postgres branches if next is already a dependency
2 changes: 1 addition & 1 deletion cli/src/commands/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export default class Init extends BaseCommand<typeof Init> {
async installSdk(packageManager: PackageManager, branchDetails: Schemas.DBBranch) {
if (isBranchPgRollEnabled(branchDetails)) {
const sdkVersion = await this.getSdkVersion();
if (!sdkVersion) {
if (!sdkVersion || sdkVersion?.includes('next')) {
await this.installPackage(packageManager, '@xata.io/client@next');
return;
} else if (!sdkVersion?.includes('next')) {
Expand Down

0 comments on commit eed3363

Please sign in to comment.