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

[Bug] Scoop Not Recognizing Local Config #5599

Closed
alliter8 opened this issue Aug 1, 2023 · 2 comments
Closed

[Bug] Scoop Not Recognizing Local Config #5599

alliter8 opened this issue Aug 1, 2023 · 2 comments
Labels

Comments

@alliter8
Copy link

alliter8 commented Aug 1, 2023

Bug Report

Current Behavior

Scoop reverts to creating and using a config.json file in the %USERPROFILE%\.config\scoop folder, regardless of whether a config.json file exists within the scoop installation dir (i.e., %USERPROFILE%\scoop\config.json).

Relates to Feature Request 4498 and its implementation in 5369.

Expected Behavior

If there is a config.json file in the scoop installation folder (e.g., %USERPROFILE%\scoop), scoop should defer to that file. It should not still create a .config folder, a config.json file within it, or ignore the config.json in the scoop root folder. (Additionally, scoop should not recreate the external folder and file if deleted in deference to using a local portable config file—even if scoop is not installed on portable media.)

Additional context/output

I created a config.json in the scoop root dir (C:\Users\%USERNAME%\scoop\) and renamed the folder the original %USERPROFILE%\.config folder to hide it. I wanted to test if a local config file in the root folder would actually work. As soon as I invoked scoop in the terminal again, though, it recreated .config\scoop\config.json. Ticket 5369 gives the following instructions:

image

. . . Is there something more required to make scoop recognize the local scoop\config.json? Is %USERPROFILE%\scoop\ the wrong place in the "root directory" for the config.json file?

Possible Solution

N/A

System details

Windows version: 10

OS architecture: 64bit

PowerShell version: v7.4.0-preview.4

Additional software: Git, curl, aria2, etc. installed with scoop.

Scoop Configuration

%USERPROFILE%\scoop\config.json:

{
  "last_update": "2023-08-01T10:12:02.9999183-07:00",
  "update_nightly": true,
  "default_architecture": "64bit",
  "aria2-enabled": false,
  "scoop_branch": "master",
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop"
}

%USERPROFILE%\.config\scoop\config.json:

{
  "last_update": "2023-08-01T09:34:47.2919489-07:00",
  "update_nightly": true,
  "default_architecture": "64bit",
  "aria2-enabled": false,
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop",
  "scoop_branch": "develop"
}
@alliter8 alliter8 added the bug label Aug 1, 2023
@HUMORCE
Copy link
Member

HUMORCE commented Aug 2, 2023

Cannot reproduce.

~
❯ cd scoop
~\scoop
❯ scoop config

alias                 : @{aliases=scoop-aliases; rife=scoop-rife; cd=scoop-cd; buckets=scoop-buckets; sync=scoop-sync;
                        sp=scoop-sp; ccache=scoop-ccache}
debug                 : True
aria2-enabled         : False
use_lessmsi           : False
last_update           : 8/2/2023 1:27:32 AM
proxy                 : none
hold_update_until     : 1/22/2096 12:00:00 AM
scoop_branch          : develop
scoop_repo            : git@github.com:HUMORCE/scoop.git
aria2-warning-enabled : False


~\scoop
❯ ni config.json

    Directory: C:\Users\humorce\scoop

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            8/2/2023  1:53 AM              0 config.json

~\scoop
❯ scoop config
~\scoop
❯ mv ~\.config\scoop ~\.config\scoop.bak
~\scoop
❯ scoop config
~\scoop
❯ test-path ~\.config\scoop
False

I guess this is the cause:

{
  "last_update": "2023-08-01T10:12:02.9999183-07:00",
  "update_nightly": true,
  "default_architecture": "64bit",
  "aria2-enabled": false,
  "scoop_branch": "master",    <-------------------------- #5369 has not been merged into master branch yet.
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop"
}

scoop update will switch to the branch that specified in configs.

@alliter8
Copy link
Author

alliter8 commented Aug 8, 2023

Resolved itself. Closing.

@alliter8 alliter8 closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants