Skip to content

Commit aea6b0e

Browse files
committed
Change the if that checks for Namespaces to work in strict mode
1 parent d48c00b commit aea6b0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ function Get-python-PackageInfoFromPackageFile ($pkg, $workingDirectory)
131131
# This is the GetDocsMsDevLanguageSpecificPackageInfoFn implementation
132132
function Get-python-DocsMsDevLanguageSpecificPackageInfo($packageInfo, $packageSourceOverride) {
133133
# If the default namespace isn't in the package info then it needs to be added
134-
if (!$packageInfo.Namespaces) {
134+
# Can't check if (!$packageInfo.Namespaces) in strict mode because Namespaces won't exist
135+
# at all.
136+
if (!($packageInfo | Get-Member Namespaces)) {
135137
# If the Version is INGORE that means it's a source install and those
136138
# ones need to be done by hand
137139
if ($packageInfo.Version -ine "IGNORE") {

0 commit comments

Comments
 (0)