Add warning for defaulting an invalid environment variable value
Rob Mensching committed
Mar 19, 2021 at 10:25 UTC
958d089f2a09b01c497d0bec8014bdfcea6313c3
1 file changed
+6
src/WixToolset.Data/WarningMessages.cs
+6
@@ -683,6 +683,11 @@ namespace WixToolset.Data
683
return Message(null, Ids.CollidingModularizationTypes, "The definition for the '{0}' table's '{1}' column is a foreign key relationship to the '{2}' table's column number {3}. The modularization types of the two column definitions differ: table '{0}' uses type {4} and table '{2}' uses type {5}. Change one of the modularization types so that they match.", tableName, columnName, foreignTableName, foreignColumnNumber, modularizationType, foreignModularizationType);
684
}
685
686
+ public static Message InvalidEnvironmentVariable(string environmentVariable, string value, string defaultValue)
687
+ {
688
+ return Message(null, Ids.InvalidEnvironmentVariable, "The {0} environment variable is set to an invalid value of '{1}'. The default value '{2}' will be used instead.", environmentVariable, value, defaultValue);
689
+ }
690
+
691
private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
692
{
693
return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
@@ -821,6 +826,7 @@ namespace WixToolset.Data
826
ExperimentalBundlePlatform = 1154,
827
DefiningWellKnownDirectoryDeprecated = 1155,
828
CollidingModularizationTypes = 1156,
829
+ InvalidEnvironmentVariable = 1157,
830
}
831
}
832
}