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

"scoop bucket add extras" doesn't work #4392

Closed
topstone opened this issue Jun 22, 2021 · 3 comments
Closed

"scoop bucket add extras" doesn't work #4392

topstone opened this issue Jun 22, 2021 · 3 comments

Comments

@topstone
Copy link
Contributor

Scoop says "The extras bucket was added successfully", but the bucket dir is empty.

My env.

  • Windows 10 Home 21H1 (19043.1055)
  • $env:scoop .... C:\Scoop\a
  • $env:scoop_global .... C:\Scoop\g

How to reproduce

> iwr -useb get.scoop.sh | iex
Initializing...
Downloading scoop...
Extracting...
Creating shim...
Downloading main bucket...
Extracting...
'lastupdate' has been set to '2021-06-22T20:39:12.1797924+09:00'
Scoop was installed successfully!
Type 'scoop help' for instructions.
> scoop install 7zip --global
Installing '7zip' (19.00) [64bit]
Loading 7z1900-x64.msi from cache
Checking hash of 7z1900-x64.msi ... ok.
Extracting 7z1900-x64.msi ... done.
Linking C:\Scoop\g\apps\7zip\current => C:\Scoop\g\apps\7zip\19.00
Creating shim for '7z'.
Creating shortcut for 7-Zip (7zFM.exe)
'7zip' (19.00) was installed successfully!
> scoop install git --global
Installing 'git' (2.32.0.windows.1) [64bit]
Loading PortableGit-2.32.0-64-bit.7z.exe from cache
Checking hash of PortableGit-2.32.0-64-bit.7z.exe ... ok.
Extracting dl.7z ... done.
Linking C:\Scoop\g\apps\git\current => C:\Scoop\g\apps\git\2.32.0.windows.1
Creating shim for 'git'.
Creating shim for 'gitk'.
Creating shim for 'git-gui'.
Creating shim for 'tig'.
Creating shim for 'git-bash'.
Creating shortcut for Git Bash (git-bash.exe)
Creating shortcut for Git GUI (git-gui.exe)
'git' (2.32.0.windows.1) was installed successfully!
> scoop bucket add extras
Checking repo... ok
fatal: could not create leading directories of '"C:\Scoop\a\buckets\extras"': Invalid argument
The extras bucket was added successfully.
> ls c:\Scoop\a\buckets

    Directory: C:\Scoop\a\buckets\

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          2021/06/22    20:40                extras
d----          2021/06/22    20:39                main

> ls C:\Scoop\a\buckets\extras\
>

When I change the line#110, buckets.ps1

    git_clone "$repo" "`"$dir`"" -q

to

    git_clone "$repo" "$dir" -q

it works well:

> scoop bucket add extras
Checking repo... ok
The extras bucket was added successfully.
> ls C:\Scoop\a\buckets\extras\

    Directory: C:\Scoop\a\buckets\extras

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          2021/06/22    21:36                .github
d----          2021/06/22    21:36                .vscode
d----          2021/06/22    21:36                bin
d----          2021/06/22    21:36                bucket
d----          2021/06/22    21:36                deprecated
d----          2021/06/22    21:36                experiment
d----          2021/06/22    21:36                scripts
-a---          2021/06/22    21:36            420 .editorconfig
-a---          2021/06/22    21:36             84 .gitattributes
-a---          2021/06/22    21:36             58 .gitignore
-a---          2021/06/22    21:36           1153 appveyor.yml
-a---          2021/06/22    21:36           1235 LICENSE
-a---          2021/06/22    21:36            517 README.md
-a---          2021/06/22    21:36            153 Scoop-Bucket.Tests.ps1
@oae
Copy link

oae commented Jun 25, 2021

I have the same problem when i use latest powershell: https://github.com/PowerShell/PowerShell/releases/tag/v7.2.0-preview.7

@sambeckingham-awaze
Copy link

I'm also having this issue - the root of the problem is that when it creates the bucket, it doesn't add the bucket git repo to the directory. As a temporary workaround, if you manually clone the repo to that folder, it works as expected.

Root cause appears to be a change in latest Powershell Core.

@ghost
Copy link

ghost commented Jul 5, 2021

I created a folder for it and cloned the extra bucket there, this solved the problem, ofc. it shouldn't be like this.

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

No branches or pull requests

4 participants