Skip to content

Commit 0295328

Browse files
authored
Merge pull request hmscott4#22 from randomnote1/FixSingleQuoteLookupError
Fix single quote lookup error
2 parents 2ca817f + 743949f commit 0295328

File tree

5 files changed

+19
-14
lines changed

5 files changed

+19
-14
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ name: Build Management Pack
44
on:
55
# Triggers the workflow on push or pull request
66
push:
7+
branches:
8+
- '*' # matches every branch that doesn't contain a '/'
9+
- '*/*' # matches every branch containing a single '/'
10+
- '**' # matches every branch
11+
- '!dev' # excludes dev
12+
- '!main' # excludes main
713
pull_request:
814

915
# Allows you to run this workflow manually from the Actions tab

AlertManagement/AlertManagement.mpproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<RootNamespace>SCOM.Alert.Management</RootNamespace>
66
<Name>SCOM.Alert.Management</Name>
77
<ManagementPackName>SCOM.Alert.Management</ManagementPackName>
8-
<Version>1.1.31.109</Version>
8+
<Version>1.2.34.112</Version>
99
<MpFrameworkVersion>v7.0.2</MpFrameworkVersion>
1010
<MpFrameworkProfile>OM</MpFrameworkProfile>
1111
<ProductVersion>1.1.0.0</ProductVersion>

AlertManagement/AlertManagement.mpproj.user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<DeploymentNextVersion>1.1.31.110</DeploymentNextVersion>
4+
<DeploymentNextVersion>1.2.34.113</DeploymentNextVersion>
55
<DeploymentAutoIncrementVersion>True</DeploymentAutoIncrementVersion>
66
<DeploymentStartAction>None</DeploymentStartAction>
77
<DeploymentWebConsoleUrl />
18 Bytes
Binary file not shown.

AlertManagement/Scripts/Assign-ScomAlert.ps1

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,17 @@ function Format-xPathExpression
6464
$Value
6565
)
6666

67-
if ($Value.Contains("'"))
68-
{
69-
return "\$Value\"
70-
}
71-
elseif ($Value.Contains('\'))
72-
{
73-
return """$Value"""
74-
}
75-
else
76-
{
77-
return $Value;
78-
}
67+
$charactersToReplace = @{
68+
"'" = '&quot;'
69+
'\' = '\\'
70+
}
71+
72+
foreach ( $characterToReplace in $charactersToReplace.GetEnumerator() )
73+
{
74+
$Value = $Value.Replace($characterToReplace.Key, $characterToReplace.Value)
75+
}
76+
77+
return $Value
7978
}
8079

8180
# Get the config file object to ensure it exists

0 commit comments

Comments
 (0)