diff options
author | Bob Arnson <bob@firegiant.com> | 2019-11-01 19:24:45 -0400 |
---|---|---|
committer | Bob Arnson <bob@firegiant.com> | 2019-11-01 19:38:13 -0400 |
commit | 34e002b3a9043ff3062c676c74fb124b5feef784 (patch) | |
tree | c1c1085d8075dc8f0acb9c4db298cff21925e153 /src | |
parent | 16ebbac306cebd4c5044ed89086c920e1bf6fae4 (diff) | |
download | wix-34e002b3a9043ff3062c676c74fb124b5feef784.tar.gz wix-34e002b3a9043ff3062c676c74fb124b5feef784.tar.bz2 wix-34e002b3a9043ff3062c676c74fb124b5feef784.zip |
Fix error checking on CustomAction/@Error.
Diffstat (limited to 'src')
3 files changed, 4 insertions, 2 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index ae99b673..ee460edc 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
@@ -3501,9 +3501,9 @@ namespace WixToolset.Core | |||
3501 | this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryKey", "Directory", "FileKey", "Property")); | 3501 | this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryKey", "Directory", "FileKey", "Property")); |
3502 | } | 3502 | } |
3503 | } | 3503 | } |
3504 | else if (CustomActionTargetType.TextData == targetType && CustomActionSourceType.Directory != sourceType && CustomActionSourceType.Property != sourceType) | 3504 | else if (CustomActionTargetType.TextData == targetType && CustomActionSourceType.Directory != sourceType && CustomActionSourceType.Property != sourceType && CustomActionSourceType.File != sourceType) |
3505 | { | 3505 | { |
3506 | this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Value", "Directory", "Property")); | 3506 | this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Value", "Directory", "Property", "Error")); |
3507 | } | 3507 | } |
3508 | else if (!String.IsNullOrEmpty(innerText)) // inner text cannot be specified with non-script CAs | 3508 | else if (!String.IsNullOrEmpty(innerText)) // inner text cannot be specified with non-script CAs |
3509 | { | 3509 | { |
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 7f06eea6..7c3dddd7 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
@@ -281,6 +281,7 @@ namespace WixToolsetTest.CoreIntegration | |||
281 | { | 281 | { |
282 | "Binary:Binary1\t[Binary data]", | 282 | "Binary:Binary1\t[Binary data]", |
283 | "CustomAction:CustomAction1\t1\tBinary1\tInvalidEntryPoint\t", | 283 | "CustomAction:CustomAction1\t1\tBinary1\tInvalidEntryPoint\t", |
284 | "CustomAction:DiscardOptimismAllBeingsWhoProceed\t19\t\tAbandon hope all ye who enter here.\t", | ||
284 | }, results); | 285 | }, results); |
285 | } | 286 | } |
286 | } | 287 | } |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs index d9633869..e4b066e9 100644 --- a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs | |||
@@ -7,5 +7,6 @@ | |||
7 | 7 | ||
8 | <Binary Id="Binary1" SourceFile="test.txt"></Binary> | 8 | <Binary Id="Binary1" SourceFile="test.txt"></Binary> |
9 | <CustomAction Id="CustomAction1" BinaryKey="Binary1" DllEntry="InvalidEntryPoint"></CustomAction> | 9 | <CustomAction Id="CustomAction1" BinaryKey="Binary1" DllEntry="InvalidEntryPoint"></CustomAction> |
10 | <CustomAction Id="DiscardOptimismAllBeingsWhoProceed" Error="Abandon hope all ye who enter here." /> | ||
10 | </Fragment> | 11 | </Fragment> |
11 | </Wix> | 12 | </Wix> |