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

fix(install)!: show fs type and abort if Junction creation fails (#5367) #6052

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Young-Lord
Copy link

Description

Currently, if Scoop is running on exFAT or other filesystems with no Junction (a.k.a. Directory Junction) support, Scoop will fail to install app during link app_name\current => app_name\0.0.1.
If mklink is used, it will prompt Local NTFS volumes are required to complete the operation.. But for New-Item, a meaningless error will show, making it hard to debug.

This may be a BREAKING CHANGE, for it directly executes abort rather than continue with error.

Motivation and Context

Relates to #5367

How Has This Been Tested?

I applied this patch and and added the following code locally, and run Scoop with scoop install adb:

function New-DirectoryJunction($source, $target) {
    $source = "G:\Windows11" # this doesn't exist
    $target = "G:\Windows" # this is a existed folder, on a exFAT disk
    # ...
}

The linking is failed as expected, and the following output is shown:

WARN  FileSystemType of target path G:\Windows: Unknown
Cannot link G:\Windows11 => G:\Windows

for the Docker part, i've done similar test.

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly. (maybe document should mention that Scoop may not work on non-NTFS filesystems, but this PR won't cover it)
  • I have updated the tests accordingly. (have no idea how to add tests)
  • I have added an entry in the CHANGELOG.

I may be slow to respond. If there is any change, feel free to directly edit!

@Young-Lord Young-Lord changed the title Patch-1 fix(install)!: show fs type and abort if Junction creation fails (#5367) Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant