Fix configuration use in start command #87
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Start command should work even if config doesn't exist
These established a hard dependency on the
config
infrastructure.We fix this, by only following the config code branch if a configuration
path can be located.
Caveat: This silences the error if a configuration is found but cannot
be parsed. I'm treading on the side of simplicity over correctness here.
In future we might treat the configuration error as a critical error.
Simplify default config file
Previously our default config for
toggl config --init
enforcedthe use of git.
Such that, even for non-vcs tracked paths we would use a configuration
that tries to resolve it's values from
git
which errors out.I think in general the wildcard match rule
[*]
should be agnostic of vcs.This changes the default to use
{{current_dir}}
which is guarenteedto work at any path the
toggl
command is invoked as is a much betterdefault.
Note: This is my configuration block for the wildcard match.
Context
Closes #84