ScoopInstaller / Main

📦 The default bucket for Scoop.
https://scoop.sh
The Unlicense
1.54k stars 918 forks source link

[Bug]: installing git globally causing Permission denied errors on git bash startup #5919

Open RioNight opened 1 week ago

RioNight commented 1 week ago

Prerequisites

Package Name

git

Expected/Current Behaviour

Expected: No error messages should appear on startup. Current: See image below. image

Steps to Reproduce

Start a cmd shell as Administrator.
Run `scoop install -g git`.
Start Git Bash and observer the Permission Denied messages below:

rm: cannot remove '/etc/post-install/01-devices.post': Permission denied
rm: cannot remove '/etc/post-install/03-mtab.post': Permission denied
rm: cannot remove '/etc/post-install/06-windows-files.post': Permission denied
rm: cannot remove '/etc/post-install/13-copy-dlls.post': Permission denied
rm: cannot remove '/etc/post-install/99-post-install-cleanup.post': Permission denied

Possible Solution

There is a post-install.bat in C:\ProgramData\scoop\apps\git\current which may need to be run in Administrator mode to resolve these errors.

Scoop and Buckets Version

Current Scoop version:
d337bb1f chore(release): Bump to version 0.4.2 (#5964)

'main' bucket:
34de79dcb sslscan: Update to version 2.1.4

'extras' bucket:
dc7816b90 staxrip: Update to version 2.41.0

Scoop Config

last_update                       scoop_repo                              scoop
                                                                          _bran
                                                                          ch   
-----------                       ----------                              -----
2024-06-16T15:34:23.1027822-05:00 https://github.com/ScoopInstaller/Scoop ma...

PowerShell Version

Name                           Value                                                                                   
----                           -----                                                                                   
PSVersion                      5.1.22621.3672                                                                          
PSEdition                      Desktop                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
BuildVersion                   10.0.22621.3672                                                                         
CLRVersion                     4.0.30319.42000                                                                         
WSManStackVersion              3.0                                                                                     
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1

Additional Softwares

No response