fix(utils): fix error when generating migrations for a module with existing snapshot (#14218)
This commit is contained in:
1 parent
a791ea03ab
commit
b517137466
2 files changed
+6
-1
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/utils": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(utils): fix error when generating migrations for a module with existing snapshot
|
||||||
@@ -210,7 +210,7 @@ export class Migrations extends EventEmitter<MigrationsEvents> {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (snapshotFile) {
|
if (snapshotFile) {
|
||||||
const absoluteName = join(snapshotFile.path, snapshotFile.name)
|
const absoluteName = join(snapshotFile.parentPath, snapshotFile.name)
|
||||||
if (absoluteName !== snapshotPath) {
|
if (absoluteName !== snapshotPath) {
|
||||||
await rename(absoluteName, snapshotPath)
|
await rename(absoluteName, snapshotPath)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user