Skip to content

Commit a48926e

Browse files
authored
fix: set default value to --type option (#38)
closes #35
1 parent dc261b2 commit a48926e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/commands/annotate.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ export default function defineCommand() {
6565

6666
const handler = async (args: Arguments<AnnotateOptions>): Promise<void> => {
6767
const ret = false
68+
if (args.type == null) {
69+
args.type = 'custom-block'
70+
}
71+
6872
const { source, type, force, details, attrs } = args as AnnotateOptions
69-
debug('anntate args:', source, type, force, details, attrs)
73+
debug('annotate args:', source, type, force, details, attrs)
7074

7175
if ((type as AnnotateMode) !== 'custom-block') {
7276
console.log(

0 commit comments

Comments
 (0)