question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CONFIG/CORE] More default config locations

See original GitHub issue

Is your feature request related to a problem? Please describe. From my experience, a “silent” convention that Linux developers have is not to “clutter” a home directory with config files/directories, but rather store them in the .config folder.

Describe the solution you’d like A solution for this problem is one I have seen frequently used is to actually have the product search in a couple (usually 2-3) locations for the specific config file (the name should always be the exact one the product expects). For example, vim searches, IIRC, the following:

  • ~/.vimrc
  • ~./.config/.vimrc (or ~./.config/vimrc, I am not entirely sure)
  • ~./.config/vim/.vimrc (or ~./.config/vim/vimrc, again sorry for not being too sure)

I think CT could benefit from such a system, even on other OSs, such as Windows, for which it could define a different set of paths (i.e. C:\Users\myusername\Documents\...).

Describe alternatives you’ve considered ~I could not come up with any satisfying alternatives for this issue, at the time of writing.~ After taking a look at the config file, since it only holds git-related info in it, an alternative would be to use the global git config (at least as a default , maybe).

Additional context As @Zethson mentioned in #218, I think it would actually be great to include the option to specify a config file in the command call, as some might want to use a different config only for a project/once/testing.

Usage example:

cookietemple -c /path/to/the/config/file ...
# or
cookietemple --config /path/to/the/config/file ...

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:34 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
Zethsoncommented, Jun 12, 2020

We decided to roll with the library.

2reactions
Zethsoncommented, Jun 12, 2020

IMO The code will look more ugly if we write this ourselves. Their methods handle the OS themselves and that bs is therefore hidden to us and doesn’t pollute cookietemple.

@Imipenem Let’s discuss this again tonight and we will finalize the decision and go with whatever

Read more comments on GitHub >

github_iconTop Results From Across the Web

git-config Documentation - Git
git-config - Get and set repository or global options ... Default behavior is to replace at most one line. ... git config core.filemode...
Read more >
How to set important Git config global properties
Here we show you the most important global gitconfig settings and ... Git config's default text editor to Vim, emacs, Textmate or Atom....
Read more >
If we change `git config core.hooksPath`, how to revert back to ...
The answer depends on where it's set and what you want to change. If the option is set in your local repository and...
Read more >
config | Data Version Control - DVC
The default value is cache , that resolves to .dvc/cache (relative to the project config file location). See also the helper command dvc...
Read more >
Git-Config: core.editor. Interact with Git's Files and Commands…
On most systems, Git defaults to vi , vim , or another command-line editor. Here's Darth Vader's Git configuration file opened in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found