Prevent the CLI to canonicalize the binary
Some checks failed
tests / tests (alpine-edge, Alpine Edge, ubuntu-latest) (push) Has been cancelled
tests / tests (alpine-latest, Alpine Latest, ubuntu-latest) (push) Has been cancelled
tests / tests (archlinux, Archlinux Base, ubuntu-latest) (push) Has been cancelled
tests / tests (centos-stream9, Centos Stream9, ubuntu-latest) (push) Has been cancelled
tests / tests (debianstable, Debian Stable, ubuntu-latest) (push) Has been cancelled
tests / tests (debiantesting, Debian Testing, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora41, Fedora 41, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora42, Fedora 42, ubuntu-latest) (push) Has been cancelled
tests / tests (opensuseleap, OpenSUSE Leap, ubuntu-latest) (push) Has been cancelled
tests / tests (opensusetumbleweed, OpenSUSE Tumbleweed, ubuntu-latest) (push) Has been cancelled
tests / tests (osx-13, macOS 13, macos-13) (push) Has been cancelled
tests / tests (osx-14, macOS 14, macos-14) (push) Has been cancelled
tests / tests (osx-15, macOS 15, macos-15) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 22.04, ubuntu-latest) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 24.04, ubuntu-latest) (push) Has been cancelled

For one, it is not necessary: the first argument on the command line is not used any
further when executing the command line. Also, if there is an extension that starts
with the same string as the binary, the binary gets also marked as an extension.
This in turn prohibits the detection of any other Timewarrior command such that e.g.
the command 'summary' in 'timew summary' is treated as an external report, which is
not present and thus makes the call fail.

Closes #677

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2025-06-24 22:44:57 +02:00 committed by Thomas Lauf
parent d43e962c6c
commit d925553116
3 changed files with 9 additions and 0 deletions

View file

@ -129,3 +129,4 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges
Eugene Morozov
Stefan Herold
Sebastian Carlos
ftambara

View file

@ -1,3 +1,5 @@
- #677 Extension names starting with 'timew' cause problems
(thanks to ftambara)
- #661 Make display of ids and annotations the default in summary report for new users
- #669 id filtering for charts and reports
- #660 Fix man page section numbers and reference formatting

View file

@ -460,6 +460,12 @@ void CLI::canonicalizeNames ()
for (auto& a : _args)
{
// Do not canonicalize the BINARY
if (a.hasTag ("BINARY"))
{
continue;
}
auto raw = a.attribute ("raw");
std::string canonical = raw;