Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making backup doesnt support all linux config paths #172

Closed
aigic8 opened this issue Aug 2, 2022 · 5 comments · Fixed by #178
Closed

making backup doesnt support all linux config paths #172

aigic8 opened this issue Aug 2, 2022 · 5 comments · Fixed by #178
Labels

Comments

@aigic8
Copy link

aigic8 commented Aug 2, 2022

Descibe the bug

If alacritty config file is not $HOME/.config/alacritty/alacritty.yml, (in my case it is $HOME/.alacritty.yml) it will throw an error

Steps to reproduce

  1. Installation:
    • installed using npm i -g alacritty-themes
  2. Running:
    • just ran alacritty-themes

Expected Behavior

Running normally, without errors

Operating System

Arch Linux (Manjaro)

Screenshots

alac-bug

I've looked around the source code a bit. Looks like the problem is from createBackup function. On Linux, when it checks if the config exist, it will check both $HOME/.config/alacritty/alacritty.yml and $HOME/.alacritty.yml. But when it creates a backup file it will always use $HOME/.config/alacritty/alacritty.yml

@JuanVqz
Copy link
Collaborator

JuanVqz commented Aug 2, 2022

good call! I assumed the alacritty.yml file was located at $HOME/.config/alacritty/alacritty.yml, I don't like the idea of creating backups in the $HOME directory thought 🤔

The solution may be use this function

function alacrittyConfigPath() {
instead of
function pathToAlacrittyFile() {

do you want to fix it?

@aigic8
Copy link
Author

aigic8 commented Aug 2, 2022

Thanks! But as you said, creating backup files in home direcotry is not really a neat solution. I think fixing this bug needs an oponionated solution which is beyond me.🙂

@JuanVqz
Copy link
Collaborator

JuanVqz commented Aug 2, 2022

a quick and good solution could be, even if the alacritty.yml file is in the $HOME directory we will create the backups files in this path $HOME/.config/alacritty/

@JuanVqz
Copy link
Collaborator

JuanVqz commented Aug 21, 2022

I just fixed the alacritty path, please download the latest version of alacritty-themes to get it working on your end 👍

Thanks for reporting it

github-actions bot pushed a commit that referenced this issue Aug 21, 2022
## [5.0.1](v5.0.0...v5.0.1) (2022-08-21)

### Bug Fixes

* **backup:** fix where to find the alacritty file path ([#178](#178)) ([355e189](355e189)), closes [#172](#172)
@rajasegar
Copy link
Owner

🎉 This issue has been resolved in version 5.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants