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(buckets): Avoid error messages for unexpected dir #5549

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

HUMORCE
Copy link
Member

@HUMORCE HUMORCE commented Jun 20, 2023

Description

Motivation and Context

Closes #XXXX

Relates to #XXXX

How Has This Been Tested?

Before:

❯ scoop bucket list
Get-Item : Cannot find path 'C:\Users\humorce\scoop\buckets\empty_dir\bucket' because it does not exist.
At C:\Users\humorce\scoop\apps\scoop\current\lib\buckets.ps1:114 char:32
+             $bucket.Updated = (Get-Item "$path\bucket").LastWriteTime
+                                ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\humorc...mpty_dir\bucket:String) [Get-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand


Name      Source                                     Updated               Manifests
----      ------                                     -------               ---------
main      git@github.com:ScoopInstaller/Main.git     6/19/2023 8:24:16 PM       1207
extras    git@github.com:ScoopInstaller/Extras.git   6/19/2023 10:46:52 PM      1881
versions  git@github.com:ScoopInstaller/Versions.git 6/19/2023 8:27:52 PM        425
java      git@github.com:ScoopInstaller/Java.git     6/18/2023 4:17:50 PM        253
empty_dir ~\scoop\buckets\empty_dir                                                0
nuke      git@github.com:HUMORCE/nuke.git            6/19/2023 6:04:32 PM        138

After:

❯ scoop bucket list

Name      Source                                     Updated               Manifests
----      ------                                     -------               ---------
main      git@github.com:ScoopInstaller/Main.git     6/19/2023 8:24:16 PM       1207
extras    git@github.com:ScoopInstaller/Extras.git   6/19/2023 10:46:52 PM      1881
versions  git@github.com:ScoopInstaller/Versions.git 6/19/2023 8:27:52 PM        425
java      git@github.com:ScoopInstaller/Java.git     6/18/2023 4:17:50 PM        253
empty_dir ~\scoop\buckets\empty_dir                                                0
nuke      git@github.com:HUMORCE/nuke.git            6/19/2023 6:04:32 PM        138

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@niheaven niheaven merged commit 3dfb4bf into ScoopInstaller:develop Jun 29, 2023
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.

2 participants