-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add -SkipLimitCheck switch to Import-PowerShellDataFile
#13672
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
Conversation
7dda6b9 to
38e86f1
Compare
|
Shouldn't this follow the JSON cmdlet's |
|
But I do think following a similar pattern is probably a better call than a switch; if a user knows the ballpark value to use, let them specify 1000 or 2000 so they can keep some control over the input file and verify things aren't getting input over and above what they expected. Have it default to 500 and then if you really want no limit, set it to zero or something? |
0 or -1 both seem logical to me |
-NoLimit switch to Import-PowerShellDataFile-SkipLimitCheck switch to Import-PowerShellDataFile
|
I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests LGTM. Small suggestion on the param name
|
The static analysis credscan issue is fixed as part of #13692 |
a918136 to
197ffa1
Compare
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
src/Modules/Unix/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1
Outdated
Show resolved
Hide resolved
|
@SteveL-MSFT Please update the PR. |
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
…hell.Utility.psd1 Co-authored-by: Aditya Patwardhan <adityap@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with @adityapatwardhan's suggestion applied
|
@PoshChan please remind me in 18 hours |
|
@rjmholt, this is the reminder you requested 18 hours ago |
Requested changes have been made
|
🎉 Handy links: |
PR Summary
By default, there is a limit to the number of keys in a hashtable allowed to be converted from a psd1 file (500 keys). This limit is hitting user cases like DSC configuration. Change is to add a
-SkipLimitCheckswitch to by-pass the validation step for a hashtable.PR Context
Fix #7979
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.Microsoft.PowerShell.Utility.PSImportPSDataFileNoLimit