GothenburgBitFactory / GothenburgBitFactory/timewarrior

Config after incorrect import is silently ignored

Open
#734 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.7k
Forks
117
Avg merge
1d 7h
Merged PRs (30d)
5

Description

Configuration values after invalid imports are silently ignored.

The `timewarrior.cfg`

```config
import /usr/local/share/doc/timew/holidays/holidays.en-US # not existing file
reports.summary.ids = yes
reports.summary.annotations = yes
```

gives

```sh
$ timew config
<...>
summary:
holidays = yes
<...>
```

while

```config
reports.summary.ids = yes
reports.summary.annotations = yes
import /usr/local/share/doc/timew/holidays/holidays.en-US # not existing file
```

gives

```sh
$ timew config
<...>
summary:
annotations = yes
holidays = yes
ids = yes
<...>
```

Inboth cases no error message is printed.

EDIT: adjusted after I realized that the filepath was wrong.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing both configurations with the `timew config` command and compare how the invalid import affects subsequent values. Trace the configuration import handling from that entry point; done means invalid imports produce an error and do not silently discard later configuration values.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.