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

Can't read config file located in <SCOOP_DIR> #64

Open
Gn3po4g opened this issue Jul 26, 2024 · 3 comments
Open

Can't read config file located in <SCOOP_DIR> #64

Gn3po4g opened this issue Jul 26, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers incompatible with scoop

Comments

@Gn3po4g
Copy link

Gn3po4g commented Jul 26, 2024

Description

Scoop can read portable config file in <SCOOP_DIR>/config.json since v0.4.0. But scoop-search doesn't use it.

Logs

The offending command causing the error with the $env:SCOOP_SEARCH_VERBOSE=1 env var set:

Commandline arguments: args.ParsedArgs{ .query = null, .hook = false, .allocator = mem.Allocator{ .ptr = anyopaque@e72f7feed0, 
  .vtable = mem.Allocator.VTable{ .alloc = fn (*anyopaque, usize, u8, usize) ?[*]u8@5920d0, .resize = fn (*anyopaque, []u8, u8, usize, 
  usize) bool@592170, .free = fn (*anyopaque, []u8, u8, usize) void@5921c0 } } }
env:SCOOP=
env:USERPROFILE=C:\Users\gnepo
env:XDG_CONFIG_HOME=
Scoop config file path: C:\Users\gnepo/.config/scoop/config.json
Scoop config file does not exist
Scoop home: C:\Users\gnepo/scoop
Could not open the buckets directory: C:\Users\gnepo/scoop/buckets.
@Gn3po4g Gn3po4g added the bug Something isn't working label Jul 26, 2024
@shilangyu
Copy link
Owner

Should be an easy fix. If I understand correctly <SCOOP_DIR> is the same as scoop home present in the logs you attached?

@Gn3po4g
Copy link
Author

Gn3po4g commented Jul 26, 2024

Yes but not really, because I removed the SCOOP environment variable to test scoopConfigFileOwned, so it reads the default USERPROFILE location. I installed Scoop in D:\Scoop so the config locate in D:\Scoop\config.json together with apps and buckets folder.

@shilangyu
Copy link
Owner

Okay thanks. I will investigate it (probably the easiest will be to just read scoop's source code) and send a fix at some point, but not in the coming days as I won't have time. If you are willing to work on this let me know, I would be happy to help. Seems like a very good introductory issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers incompatible with scoop
Projects
None yet
Development

No branches or pull requests

2 participants