@@ -19,7 +19,7 @@ type ListDescription =
19
19
const renamep = util . promisify ( fs . rename )
20
20
21
21
const description =
22
- ' Generate a manifest file (`pom.xml`) from Scala\ 's `build.sbt` file'
22
+ " Generate a manifest file (`pom.xml`) from Scala's `build.sbt` file"
23
23
24
24
const scalaCmdFlags : Record < string , ListDescription > = {
25
25
bin : {
@@ -88,8 +88,10 @@ export const scala: CliSubcommand = {
88
88
const name = `${ parentName } scala`
89
89
// note: meow will exit if it prints the --help screen
90
90
const cli = meow ( help ( name , scalaCmdFlags ) , {
91
+ flags : < { [ key : string ] : any } > scalaCmdFlags ,
91
92
argv : argv . length === 0 ? [ '--help' ] : argv ,
92
93
description,
94
+ allowUnknownFlags : false ,
93
95
importMeta
94
96
} )
95
97
@@ -98,7 +100,6 @@ export const scala: CliSubcommand = {
98
100
}
99
101
100
102
const target = cli . input [ 0 ]
101
-
102
103
if ( ! target ) {
103
104
// will exit.
104
105
new Spinner ( )
@@ -172,7 +173,7 @@ async function startConversion(
172
173
console . log ( `[VERBOSE] - Absolute target path: \`${ rtarget } \`` )
173
174
console . log ( `[VERBOSE] - Absolute out path: \`${ rout } \`` )
174
175
} else {
175
- console . log ( `- executing: \`${ bin } \`` ) ;
176
+ console . log ( `- executing: \`${ bin } \`` )
176
177
console . log ( `- src dir: \`${ target } \`` )
177
178
console . log ( `- dst dir: \`${ out } \`` )
178
179
}
@@ -199,9 +200,9 @@ async function startConversion(
199
200
spinner . error ( 'There were errors while running sbt' )
200
201
// (In verbose mode, stderr was printed above, no need to repeat it)
201
202
if ( ! verbose ) {
202
- console . group ( '[VERBOSE] stderr:' ) ;
203
+ console . group ( '[VERBOSE] stderr:' )
203
204
console . error ( output . stderr )
204
- console . groupEnd ( ) ;
205
+ console . groupEnd ( )
205
206
}
206
207
process . exit ( 1 )
207
208
}
@@ -234,11 +235,14 @@ async function startConversion(
234
235
spinner . start ( ) . success ( `OK. File should be available in \`${ out } \`` )
235
236
}
236
237
} catch ( e ) {
237
- spinner . error ( 'There was an unexpected error while running this' + ( verbose ? '' : ' (use --verbose for details)' ) )
238
+ spinner . error (
239
+ 'There was an unexpected error while running this' +
240
+ ( verbose ? '' : ' (use --verbose for details)' )
241
+ )
238
242
if ( verbose ) {
239
- console . group ( '[VERBOSE] error:' ) ;
243
+ console . group ( '[VERBOSE] error:' )
240
244
console . log ( e )
241
- console . groupEnd ( ) ;
245
+ console . groupEnd ( )
242
246
}
243
247
process . exit ( 1 )
244
248
}
0 commit comments