Skip to content

Commit c23c827

Browse files
fix(migrate): npx sv migrate fails to run (#676)
Co-authored-by: CokaKoala <[email protected]>
1 parent 6789f23 commit c23c827

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.changeset/major-moles-cut.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'sv': patch
3+
---
4+
5+
fix(migrate): allow `migrate` to run without specifying a migration arg

packages/cli/commands/migrate.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,8 @@ import { forwardExitCode } from '../utils/common.js';
77

88
export const migrate = new Command('migrate')
99
.description('a CLI for migrating Svelte(Kit) codebases')
10-
.argument('<migration>', 'migration to run')
10+
.argument('[migration]', 'migration to run')
1111
.option('-C, --cwd <path>', 'path to working directory', process.cwd())
12-
.configureHelp({
13-
formatHelp() {
14-
// we'll pass the responsibility of presenting the help menu over to `svelte-migrate`
15-
runMigrate(process.cwd(), ['--help']);
16-
return '';
17-
}
18-
})
1912
.action((migration, options) => {
2013
runMigrate(options.cwd, [migration]);
2114
});

0 commit comments

Comments
 (0)