Skip to content

Commit f1bd316

Browse files
authored
scan create: show users which fielsd are missing (#318)
1 parent c0afc5f commit f1bd316

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/commands/scan/create.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ async function setupCommand(
163163
})
164164
}
165165
)
166+
166167
const packagePaths = await getPackageFilesFullScans(
167168
cwd,
168169
cli.input,
@@ -172,9 +173,9 @@ async function setupCommand(
172173
if (!repoName || !branchName || !packagePaths.length) {
173174
showHelp = true
174175
console.error(`${colors.bgRed(colors.white('Input error'))}: Please provide the required fields:\n
175-
- Repository name using --repo\n
176-
- Branch name using --branch\n
177-
- At least one file path (e.g. ./package.json)`)
176+
- Repository name using --repo ${!repoName ? colors.red('(missing!)') : colors.green('(ok)')}\n
177+
- Branch name using --branch ${!branchName ? colors.red('(missing!)') : colors.green('(ok)')}\n
178+
- At least one file path (e.g. ./package.json) ${!packagePaths.length ? colors.red('(missing or no matching/supported files found!)') : colors.green('(ok)')}`)
178179
}
179180
if (showHelp) {
180181
cli.showHelp()

0 commit comments

Comments
 (0)