Open BearAlliance opened 2 years ago
Ah, just found this
// --from option (used by init-log4brains to create the starter ADRs)
// Since this is a private use case, we don't include it in CORE for now
Is the --from
flag not meant to be used by the end user? That intention makes sense given the current behavior.
I found it using --help
, not in the README.
npx log4brains adr new --help
Bug Report
Description
When templates do not exist, the
--from
flag is ignored, and an error is thrown.Steps to Reproduce
See the sample repository
--from
flagExpected Behavior
A new ADR is generated from the file specified by
--from
Context
Didn't have a need for the base template. Only two packages are used, each with their own template. Before I figured out that putting
template.md
in theadrFolder
directory worked, I tried using the--from
CLI argument.Environment
^1.0.0-beta.11
v16.13.0
Possible Solution
The error is thrown from AdrTemplateRepository.ts. It would seem that this template check is done before checking the path provided with
--from
.You can just define a template in any of the
adrFolder
directories to get around this, and the--from
flag works just fine, but it would seem to me that that argument, and the presence of a template, are independent of one another.