Save-DbaCommunitySoftware - Accept an array of Software values, add All - #10545
Open
potatoqualitee wants to merge 2 commits into
Open
Save-DbaCommunitySoftware - Accept an array of Software values, add All#10545potatoqualitee wants to merge 2 commits into
potatoqualitee wants to merge 2 commits into
Conversation
-Software now accepts an array to download several community tools in one call, plus a new All value that expands to every supported tool. Url, LocalFile and LocalDirectory still only apply to a single tool, so they now warn and no-op when combined with more than one Software value, including All. Also fixes a couple of pre-existing issues surfaced by the new behavioral coverage: - A failed download only continued the inner retry loop instead of moving on to the next software item, so a fully failed download fell through into Expand-Archive against a missing zip file. - dba-multitool's GitHub default branch was renamed from master to main upstream; the hardcoded default here was never updated. Fixes a blind spot in the style hook while here: validate-style.ps1 had no state tracking for <# #> block comments (only # line comments), so it mechanically rejected single quotes inside comment-based help. Added tracking that mirrors the existing here-string state machine. (do Save-DbaCommunitySoftware) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Would it be possible to have something for new SQL builds: |
Member
Author
|
sure, lez do it @SQLDataCloud |
|
My PowerShell isn't brilliant, but happy to help on this where I can. Super curious and geeky to know how a dbatools command is created from the ground up. 🤘🤓 |
…LocalDirectory tests Both tests deliberately trigger the "single -Software value" warning and assert it through $WarnVar, but did not silence it, so a full suite run reported two warnings for this file. The assertions are unchanged. (do Save-DbaCommunitySoftware) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-Softwarenow accepts an array ([string[]]), so multiple community tools can be downloaded in one call, with native tab-completion preserved viaValidateSet.Allvalue that expands to every supported tool.Url,LocalFileandLocalDirectoryonly describe a single tool, so they now warn and no-op instead of downloading when combined with more than oneSoftwarevalue (includingAll).Expand-Archiveagainst a missing zip file.dba-multitool's GitHub default branch was renamed frommastertomainupstream; the hardcoded default here was never updated, so-Software DbaMultiTool(orAll) failed without an explicit-Branch main. Found via the new real-downloadAlltest..claude/hooks/validate-style.ps1: it tracked here-string state but had no equivalent for<# #>block comments (only#line comments), so it mechanically rejected single quotes inside comment-based help text. Added tracking that mirrors the existing here-string state machine.Test plan
Allvalue-Software Alland verifies each one landedLocalDirectorywarning tests extended to cover theAllcase