File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -294,8 +294,7 @@ async function run(
294294 let updatedInput = false
295295
296296 if ( ! targets . length && ! dryRun && interactive ) {
297- const received = await suggestTarget ( )
298- targets = received ?? [ ]
297+ targets = await suggestTarget ( )
299298 updatedInput = true
300299 }
301300
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ function createLeaf(
239239 type : alert . type ,
240240 policy : policyAction ,
241241 url : getSocketDevPackageOverviewUrlFromPurl ( art ) ,
242- manifest : art . manifestFiles ?. map ( obj => obj . file ) ?? [ ] ,
242+ manifest : art . manifestFiles ?. map ( o => o . file ) ?? [ ] ,
243243 }
244244 return leaf
245245}
Original file line number Diff line number Diff line change 11import { select } from '@socketsecurity/registry/lib/prompts'
22
3- export async function suggestTarget ( ) : Promise < string [ ] | void > {
3+ export async function suggestTarget ( ) : Promise < string [ ] > {
44 // We could prefill this with sub-dirs of the current
55 // dir ... but is that going to be useful?
66 const proceed = await select < boolean > ( {
@@ -19,7 +19,5 @@ export async function suggestTarget(): Promise<string[] | void> {
1919 } ,
2020 ] ,
2121 } )
22- if ( proceed ) {
23- return [ '.' ]
24- }
22+ return proceed ? [ '.' ] : [ ]
2523}
You can’t perform that action at this time.
0 commit comments