v4.1.2 is taking current directory as root directory
See original GitHub issueHi, I am the package manager of this in AUR. When i tried to update it i got in to this problem.
Describe the bug
This program takes current directory as the root directory of the package.
In the new update rootDirectory()
function takes process.env.PWD
as the root directory which causes error like this…
❯ alacritty-themes
? Select a theme ›
❯ 3024.dark
3024.light
Afterglow
Argonaut
Ashes.dark
Ashes.light
Astromouse
Atelierdune.dark
Atelierdune.light
↓ Atelierforest.darknode:fs:585
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, open '/home/USER/themes/3024.dark.yml'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at updateThemeWithFile (/usr/lib/node_modules/alacritty-themes/index.js:51:24)
at updateTheme (/usr/lib/node_modules/alacritty-themes/index.js:100:10)
at /usr/lib/node_modules/alacritty-themes/index.js:107:12 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/USER/themes/3024.dark.yml'
}
To Reproduce Steps to reproduce the behavior:
- install v4.1.2
- run alacritty-themes in terminal
- See error
Expected behavior taking root directory as root directory. For linux where its installed as root is “/usr/lib/node_modules/alacritty-themes”.
Desktop (please complete the following information):
- OS: Linux
- Version v4.1.2
Additional context I will try to patch it by hard coding the location for now and update the package.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Directory.GetDirectoryRoot(String) Method (System.IO)
Returns the volume information, root information, or both for the specified path.
Read more >Unable to list FTP root directory · Issue #1060 · icetee/remote-ftp
When using remote-ftp package version 2.0.0, 1.3.4, 1.3.1, 1.2.6 and 1.2.1 when I connect to a FTP ... Current restricted directory is /...
Read more >Determine project root from a running node.js application
This returns the current working directory. ... uses several techniques to determine the root path of the app, taking into account globally ...
Read more >Linux Command Line (04) CD - Change Directory - YouTube
We see the / is the root directory and when we start a path with / we ... cd – will take you...
Read more >1.7 Working directories | An Introduction to R
If you weren't using an RStudio Project then you would have to set your working directory using the setwd() function at the start...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hahaha its nothing.
manjaro is a good start but dont be there for too long its takes sometime before releasing updates. which is not good for following the archwiki TBH. be on manjaro for leaning the basics then move to pure arch and make the system yours.
I created this pull request after finding a potential solution. so, the variable
__dirname
gives me the actual location of the file. not even the symlinked one. and from there two step upstairs is the root which we are trying to calculate.please check if it works on other OS too.