You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// note: meow will exit if it prints the --help screen
83
-
constcli=meow(
84
-
help(name,sbomFlags),
85
-
{
86
-
argv: argv.length===0 ? ['--help'] : argv,
87
-
description,
88
-
importMeta
89
-
}
90
-
)
87
+
constcli=meow(help(name,sbomFlags),{
88
+
argv: argv.length===0 ? ['--help'] : argv,
89
+
description,
90
+
importMeta
91
+
})
91
92
92
93
consttarget=cli.input[0]
93
94
94
95
if(!target){
95
96
// will exit.
96
-
newSpinner().start('Parsing...').error(`Failure: Missing FILE|DIR argument. See \`${name} --help\` for details.`);
97
-
process.exit(1);
97
+
newSpinner()
98
+
.start('Parsing...')
99
+
.error(
100
+
`Failure: Missing FILE|DIR argument. See \`${name} --help\` for details.`
101
+
)
102
+
process.exit(1)
98
103
}
99
104
100
105
if(cli.input.length>1){
101
106
// will exit.
102
-
newSpinner().start('Parsing...').error(`Failure: Can only accept one FILE or DIR, received ${cli.input.length} (make sure to escape spaces!). See \`${name} --help\` for details.`);
103
-
process.exit(1);
107
+
newSpinner()
108
+
.start('Parsing...')
109
+
.error(
110
+
`Failure: Can only accept one FILE or DIR, received ${cli.input.length} (make sure to escape spaces!). See \`${name} --help\` for details.`
111
+
)
112
+
process.exit(1)
104
113
}
105
114
106
-
letbin:string='sbt'
115
+
letbin:string='sbt'
107
116
if(cli.flags['bin']){
108
117
bin=cli.flags['bin']asstring
109
118
}
110
119
111
-
letout:string='./socket.pom.xml'
120
+
letout:string='./socket.pom.xml'
112
121
if(cli.flags['out']){
113
122
out=cli.flags['out']asstring
114
123
}
115
124
if(cli.flags['stdout']){
116
-
out='-';
125
+
out='-'
117
126
}
118
127
119
128
// TODO: we can make `-` (accept from stdin) work by storing it into /tmp
120
129
if(target==='-'){
121
-
newSpinner().start('Parsing...').error(`Failure: Currently source code from stdin is not supported. See \`${name} --help\` for details.`);
122
-
process.exit(1);
130
+
newSpinner()
131
+
.start('Parsing...')
132
+
.error(
133
+
`Failure: Currently source code from stdin is not supported. See \`${name} --help\` for details.`
// We must now run sbt, pick the generated xml from the /target folder (the stdout should tell you the location upon success) and store it somewhere else.
154
176
// TODO: Not sure what this somewhere else might be tbh.
0 commit comments