Description
document create, wiki create, and document view do not read the BACKLOG_PROJECT environment variable, even though their help text lists it under ENVIRONMENT VARIABLES. Other commands (e.g. issue create, document list) resolve the project from the same variable as expected.
In non-interactive mode (piped stdin or CI) the create commands abort with an error, and in interactive mode they show a prompt that should not be necessary. For document view, --web fails with The --project flag is required when using --web. even when the variable is set.
Cause: the --project option of these commands is defined with a plain .option() call, missing .env("BACKLOG_PROJECT"). The envVars() declaration only affects help rendering and does not wire the environment variable to the option.
Expected: with BACKLOG_PROJECT set, these commands resolve the project from the environment, consistent with their help text and with the other commands.
I have a fix ready and will open a PR referencing this issue.
Steps to reproduce
$ export BACKLOG_PROJECT=MY_PROJECT
$ echo "body" | bee document create -t "Title"
ERROR Project is required. Use arguments to provide it in non-interactive mode.
$ bee document list # works fine with the same environment variable
bee version
1.0.0
Description
document create,wiki create, anddocument viewdo not read theBACKLOG_PROJECTenvironment variable, even though their help text lists it under ENVIRONMENT VARIABLES. Other commands (e.g.issue create,document list) resolve the project from the same variable as expected.In non-interactive mode (piped stdin or CI) the create commands abort with an error, and in interactive mode they show a prompt that should not be necessary. For
document view,--webfails withThe --project flag is required when using --web.even when the variable is set.Cause: the
--projectoption of these commands is defined with a plain.option()call, missing.env("BACKLOG_PROJECT"). TheenvVars()declaration only affects help rendering and does not wire the environment variable to the option.Expected: with
BACKLOG_PROJECTset, these commands resolve the project from the environment, consistent with their help text and with the other commands.I have a fix ready and will open a PR referencing this issue.
Steps to reproduce
bee version
1.0.0