ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21k stars 1.4k forks source link

[Bug] Missing folders after installing packages making applications behave incorrectly #6011

Open otavio-silva opened 3 months ago

otavio-silva commented 3 months ago

Bug Report

There's possibly an issue with Scoop installation process extracting from .exe installer files. As reported in here and later figuring out in the discussion, for some reason installing the tor-browser package there's a folder missing (Browser\browser) that causes the error I experienced.

Current Behavior

After installing the extras/tor-browser, there's a folder missing that causes the app to not behave correctly. When installing the application downloading it manually, either through the installer or extracting using 7-zip, the issue does not occur. Copying the missing folder also seems to fix the issue.

Expected Behavior

Tor Browser should open and execute normally.

Additional context/output

I think it's important to note that the issue appearing coincides with Scoop updating to version 0.4.2 and tor-browser updating to 13.0.15, as noted by someone in the discussion.

Possible Solution

It's only a wild guess, but maybe there's something up with having one folder inside another with the same name only differing by the first letter being uppercase or not?

System details

Windows version: 11 Pro 23H2

OS architecture: 64bit

PowerShell version: system is 5.1.22621.3672 and Microsoft store version is 7.4.2

Additional software: 7-zip is 24.06, git is 2.45.2

Scoop Configuration

{
  "last_update": "2024-06-11T19:15:24.7094978-03:00",
  "aria2-warning-enabled": false,
  "aria2-disabled": true,
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop",
  "scoop_branch": "master"
}
HUMORCE commented 2 months ago

Caused by #5945

otavio-silva commented 2 months ago

Caused by #5945

Was this pull request merged before the latest release? I can still reproduce it.

KevinStaude commented 2 months ago

Caused by #5945

Was this pull request merged before the latest release? I can still reproduce it.

Same.

o-l-a-v commented 1 month ago

I've done some testing. Scoop is hard to debug IMO. I think it must be one of these two lines, most likely Robocopy which movedir uses:


Edit: When testing locally by downloading the EXE manually and extract it with 7-Zip, then with robocopy.exe "C:\Users\olavb\Desktop\Te\out\Browser" "C:\Users\olavb\Desktop\Te\out" /e /move to move files one level up, the "browser" directory get's renamed to "Browser" (capital B), which Scoop then deletes as it's the same name as the temp directory.

image

Windows file system and PowerShell are as we all know case insensitive, so maybe the changing of case isn't the problem here. Rather that a folder inside $extractDir has the exact same name.


Commenting out this:

And Tor gets installed successfully.