Skip to content

Commit

Permalink
fix: suggest running svelte-migrate with latest if migration does not…
Browse files Browse the repository at this point in the history
… exist (#11362)

* fix: suggest running with latest if migration does not exist

* Changeset
  • Loading branch information
geoffrich authored Dec 18, 2023
1 parent fc8389c commit 975ec9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cool-moles-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-migrate': patch
---

suggest running migrate command with latest if migration does not exist
8 changes: 7 additions & 1 deletion packages/migrate/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ if (migrations.includes(migration)) {
migrate();
} else {
console.error(
colors.bold().red(`You must specify one of the following migrations: ${migrations.join(', ')}`)
colors
.bold()
.red(
`You must specify one of the following migrations: ${migrations.join(', ')}\n` +
'If you expected this to work, try re-running the command with the latest svelte-migrate version:\n' +
` npx svelte-migrate@latest ${migration}`
)
);
}

0 comments on commit 975ec9c

Please sign in to comment.