dsccommunity / dsccommunity/SqlServerDsc
SqlServerDscHelper: Get-LocalizedData fails on cmdlet Import-LocalizedData if the path does not exist
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
Details of the scenario you tried and the problem that is occurring
The helper function Get-LocalizedData fails on cmdlet Import-LocalizedData if the path does not exist, for example when falling back to en-US.
Verbose logs showing the problem
Import-LocalizedData : Cannot find the PowerShell data file 'myResource.strings.psd1' in directory 'C:\Source\...\en-US\en-US', or in any parent culture directories.
Suggested solution to the issue
The helper function Get-LocalizedData should check if the path exist after it has fallen back to en-US and throw a correct error message, instead of letting Import-LocalizedData fail.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
n/a
SQL Server edition and version the target node is running
n/a
SQL Server PowerShell modules present on the target node
n/a
The operating system the target node is running
n/a
Version and build of PowerShell the target node is running
n/a
Version of the DSC module that was used ('dev' if using current dev branch)
dev
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in DSCResources/CommonResourceHelper.psm1 at lines 239-255 and inspect how Get-LocalizedData falls back to en-US before calling Import-LocalizedData. Reproduce the missing-path case described in the issue, then verify that the helper checks the resulting path and reports the intended error instead of exposing Import-LocalizedData's failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100