Skip to content

Commit fb27b44

Browse files
committed
fix(manifest): warn when --configs/--ignore-unresolved are used without --facts (REA-474)
Those options only affect --facts; the pom path (`sbt makePom`) has no equivalent. Warn on an explicitly-passed flag in pom mode rather than silently ignoring it. socket.json defaults don't trigger the warning — only a flag actually present on the command line.
1 parent 160208a commit fb27b44

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/commands/manifest/cmd-manifest-scala.mts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,20 @@ async function run(
223223
verbose = false
224224
}
225225

226+
// `--configs` and `--ignore-unresolved` only affect --facts; the pom path
227+
// (`sbt makePom`) has no equivalent knobs. Warn rather than silently ignore
228+
// an explicitly-passed flag. (socket.json defaults don't trip this — only a
229+
// flag actually present on the command line does.)
230+
if (
231+
!facts &&
232+
(cli.flags['configs'] !== undefined ||
233+
cli.flags['ignoreUnresolved'] !== undefined)
234+
) {
235+
logger.warn(
236+
'The `--configs` and `--ignore-unresolved` options only apply with `--facts`; ignoring them.',
237+
)
238+
}
239+
226240
if (verbose) {
227241
logger.group('- ', parentName, config.commandName, ':')
228242
logger.group('- flags:', cli.flags)

0 commit comments

Comments
 (0)