iainbrighton / PScribo

PowerShell documentation framework
MIT License
232 stars 35 forks source link

Errors under importing module #63

Closed it-praktyk closed 6 years ago

it-praktyk commented 6 years ago

In the environment

PS >get-culture

LCID             Name             DisplayName
----             ----             -----------
1045             pl-PL            Polish (Poland)

PS >$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.15063.726
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15063.726
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

under importing of PSCribo

PS >Get-Module PSCribo | Format-List

Name              : PScribo
Path              : <FOLDER_PATH>\PScribo\PScribo.psm1
Description       : PScribo documentation Powershell module/framework.
ModuleType        : Script
Version           : 0.7.19
NestedModules     : {}
ExportedFunctions : {BlankLine, Document, DocumentOption, Export-Document...}
ExportedCmdlets   :
ExportedVariables :
ExportedAliases   : GlobalOption

errors are displayed many times.

The variable '$localized' cannot be retrieved because it has not been set.
At <FOLDER_PATH>\PScribo\PScribo.psm1:14 char:24
+         Write-Verbose ($localized.ImportingFile -f $_.FullName);
+                        ~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (localized:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined

It's related to the situation where PSCulture is different than en-US.

Related issues