Skip to content

Commit

Permalink
Merge pull request dataplat#956 from sqlcollaborative/development
Browse files Browse the repository at this point in the history
small fix for PS v4 and below
  • Loading branch information
Chrissy LeMaire authored Mar 15, 2017
2 parents 081f7b8 + f908381 commit e11c8cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dbatools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'dbatools.psm1'

# Version number of this module.
ModuleVersion = '0.8.941'
ModuleVersion = '0.8.942'

# ID used to uniquely identify this module
GUID = '9d139310-ce45-41ce-8e8b-d76335aa1789'
Expand Down
2 changes: 1 addition & 1 deletion functions/Find-DbaCommand.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Finds all commands searching the entire help for "snapshot", rebuilding the inde
Write-Verbose "Rebuild done in $($swrebuild.Elapsedmilliseconds)ms"

}
$consolidated = Get-Content $idxfile | ConvertFrom-Json
$consolidated = Get-Content -Raw $idxfile | ConvertFrom-Json
$result = $consolidated
if ($Pattern.length -gt 0)
{
Expand Down
2 changes: 1 addition & 1 deletion functions/Get-DbaSqlBuildReference.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Integrate with other commandlets to have builds checked for all your registered
if(!(Test-Path $writable_idxfile)) {
Copy-Item $orig_idxfile $writable_idxfile
}
return (Get-Content $writable_idxfile)
return (Get-Content -Raw $writable_idxfile)
}
}

Expand Down
7 changes: 4 additions & 3 deletions internal/Select-DefaultView.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Function Select-DefaultView
if ($p -like "* as *")
{
$old, $new = $p -isplit " as "

Add-Member -InputObject $inputobject -MemberType AliasProperty -Name $new -Value $old -Force -ErrorAction SilentlyContinue
# Do not be tempted to not pipe here
$inputobject | Add-Member -MemberType AliasProperty -Name $new -Value $old -Force -ErrorAction SilentlyContinue
$newproperty += $new
}
else
Expand All @@ -63,7 +63,8 @@ Function Select-DefaultView

$standardmembers = [System.Management.Automation.PSMemberInfo[]]@($defaultset)

Add-Member -InputObject $inputobject -MemberType MemberSet -Name PSStandardMembers -Value $standardmembers -Force -ErrorAction SilentlyContinue
# Do not be tempted to not pipe here
$inputobject | Add-Member -MemberType MemberSet -Name PSStandardMembers -Value $standardmembers -Force -ErrorAction SilentlyContinue

$inputobject
}
Expand Down

0 comments on commit e11c8cb

Please sign in to comment.