Skip to content

Commit b517137

Browse files
authored
fix(utils): fix error when generating migrations for a module with existing snapshot (medusajs#14218)
1 parent a791ea0 commit b517137

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/icy-vans-kneel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@medusajs/utils": patch
3+
---
4+
5+
fix(utils): fix error when generating migrations for a module with existing snapshot

packages/core/utils/src/migrations/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class Migrations extends EventEmitter<MigrationsEvents> {
210210
)
211211

212212
if (snapshotFile) {
213-
const absoluteName = join(snapshotFile.path, snapshotFile.name)
213+
const absoluteName = join(snapshotFile.parentPath, snapshotFile.name)
214214
if (absoluteName !== snapshotPath) {
215215
await rename(absoluteName, snapshotPath)
216216
}

0 commit comments

Comments
 (0)