Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Fix wildcard service issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbera committed Dec 8, 2017
1 parent b0788de commit f8c9826
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ function StartStopServices(
[string[]] $servicesNamesArray = ($serviceNames -split ',' -replace '"').Trim()

[bool] $atLeastOneServiceWasNotFound = $false
[PSCustomObject[]] $presentServicesArray
$presentServicesArray = $null
$servicesNamesArray | ForEach-Object {
$serviceName = $_
$matchingServices = Get-Service -Name $serviceName
$matchingServices = [PSCustomObject[]] (Get-Service -Name $serviceName -ErrorAction SilentlyContinue)

if ($matchingServices -eq $null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ function StartStopServices(
{
[string[]] $servicesNamesArray = ($serviceNames -split ',' -replace '"').Trim()

[PSCustomObject[]] $presentServicesArray
$presentServicesArray = $null
$servicesNamesArray | ForEach-Object {
$serviceName = $_
$matchingServices = Get-Service -Name $serviceName -ErrorAction SilentlyContinue
$matchingServices = [PSCustomObject[]] (Get-Service -Name $serviceName -ErrorAction SilentlyContinue)

if ($matchingServices -eq $null)
{
Expand Down
2 changes: 1 addition & 1 deletion config.bootstrap.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tokens":{
"Major": 4,
"Major": 6,
"Patch": 1
},
"prefix" : "{{",
Expand Down

0 comments on commit f8c9826

Please sign in to comment.