-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Reinstate 'current' junctions as a part of scoop reset
#4573
Comments
|
Symbolic links cannot be created without admin access |
Sorta no longer true. See https://www.howtogeek.com/292914/what-is-developer-mode-in-windows-10/ : In Windows 10’s Creators Update, putting your device into developer mode relaxes restrictions on creating symbolic links. Previously, it was only possible for Administrator users to create symlinks. This is still the case on Windows 10—unless you put it into Developer Mode. In Developer Mode, a user account with any level of privileges can create symbolic links. In other words, you can open a normal Command Prompt window and use the mklink command. Outside of Developer Mode, you’d need to open a Command Prompt window as Administrator before using the mklink command. Symbolic links are often used by developers, so this change makes it possible for development tools to create and work with symbolic links without having to run as Administrator. |
Yes, but you need an admin to enable that Developer Mode (one time setup) in the first place, if I remember correctly, which brings us back to square one. |
okay. I can't find the log as to what sent me down this path as has scrolled off my terminal buffer. But, I think it was because either The below is one of my earliest trouble shooting logs
The above snipped was clue-ing me that scoop thinks that the app is not installed, and then it was a matter of troubleshooting why it was able to get some of the info by reading the Firstly don't assume me to be an expert on NTFS junctions. As you mention you need to be very careful study and weigh each type of link before you choose, in order to ensure backward compatibility, and remain consistent with scoop-philosophy which I also like and support. The powershell script that I typed in #4573 (comment) fixed all the current junctions and then I was able to do a Junction repair is a one time work. So maybe just having scoop being able fix its junctions is all that is needed. |
Yes, that seems to be a reasonable request - that's why I didn't close this issue :) Would you like to submit a PR? We can repair junctions as a part of scoop-reset, with an optional (off by default) flag. |
I appreciate you for trying to let me make a developer contribution. But it would be more exigent if an expert coder like you do it and take full-credits for it. If i had to do it, I'd have to get my setup to do more testing, get more intimate with the code base, make decision points as to where it has to go and rewrite the code from a goofy-one-liner to a formal coding style and do error handling and all that. Thx though. |
scoop reset
Could you try to disable And, since this is rare use case, please report any problem that you may meet. |
@niheaven , when using
Relates #3655 |
Thanks, we will check these issues. |
WRONG!
|
Thanks for the info. Updated my comment.
Scoop collects no information. See #3781. |
And my question was out of Scoop's features, but in general. Whatever |
Why are you asking here if it's out of Scoop's scope? |
Because it's directly connected about how software should be written when there's a plausibility of something not working due to user permissions |
Closed in #4720 |
Bug Report
Package Name: [name of package which has bug(s)]
scoop
Current Behaviour
Scoop uses a NTFS-directory-junction 'current` to point to the active-version of an app.
The NTFS junction is absolute.
Hence when scoop is
xcopy
-ed into a VHDX and remounted on another windows-OS installation, the scoop root folder may not be in exactly the same location. (```xcopy /H /E /B /O /K /Y src dst```)As a result powershell-function ```app_status()``` is not able to descend into the junction to retrieve the installed manifest,json and hence scoop list throws an error .
The NTFS-directory-junction contains path from the other operating system, which is invalid on the new one.
Hence, errors.
Expected Behaviour
Scoop should still work when copied for portability sake, instead of requiring user to install applications afresh
Perhaps instead of NTFS-junction, consider using
mklink /d current 21.06
Junction-links are always absolute, when copied point to the original mount path, environment variables cannot be embedded.
I want scoop to be
Workaround
C:\vol\scoop_01\scoop
scoop reset
Additional context/output
Possible Solution
System details
Windows version: [e.g. 7, 8, 10]
Windows-10 and Windows-11
OS architecture: [e.g. 32bit, 64bit]
64-bit
PowerShell version: [output of
"$($PSVersionTable.PSVersion)"
]PS C:\Users\admin> echo $PSVersionTable
Name Value
PSVersion 5.1.22000.282
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22000.282
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Additional software: [(optional) e.g. ConEmu, Git]
The text was updated successfully, but these errors were encountered: