Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #61 from BrucePay/brucepay_pre_1_0
Browse files Browse the repository at this point in the history
Updates for release, bug fix for #56
  • Loading branch information
Bruce Payette authored Nov 14, 2018
2 parents 423712e + ef3fc10 commit 7b76e65
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
19 changes: 12 additions & 7 deletions WindowsCompatibility/WindowsCompatibility.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,29 @@ AliasesToExport = @('Add-WinPSModulePath')
PrivateData = @{
PSData = @{
Tags = @('WindowsPowerShell', 'Compatibility', 'Core')
Prerelease = 'rc1'
LicenseUri = 'https://opensource.org/licenses/MIT'
ProjectUri = 'https://github.com/PowerShell/WindowsCompatibility'
ReleaseNotes = @'
This is the first release candidate (RC) of this module with the following commands:
This module provides a set of commands that allow you to use
Windows PowerShell modules from PowerShell Core (PowerShell 6).
The following commands are included:
Initialize-WinSession
Add-WinFunction
Invoke-WinCommand
Get-WinModule
Import-WinModule
Compare-WinModule
Copy-WinModule
These commands provide a set of tools allowing you to run Windows PowerShell
commands from PowerShell Core (PowerShell 6). See the help for the
individual commands for examples on how to use this functionality.
See the help for the individual commands for examples on how
to use this functionality.
Additionally, the command `Add-WindowsPSModulePath` enables enumerating
existing Windows PowerShell modules within PowerShell Core 6.
Additionally, the command `Add-WindowsPSModulePath` will update
your $ENV:PSModulePath to include Windows PowerShell module directories
within PowerShell Core 6.
NOTE: This release is only intended to be used with PowerShell Core 6
running on Microsoft Windows. Linux and MacOS are not supported at this
time.
'@

} # End of PSData hashtable
Expand Down
5 changes: 3 additions & 2 deletions WindowsCompatibility/WindowsCompatibility.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Set-Alias -Name Add-WinPSModulePath -Value Add-WindowsPSModulePath
# Location Changed handler that keeps the compatibility session PWD in sync with the parent PWD
# This only applies on localhost.
$locationChangedHandler = {
[PSSession] $session = Initialize-WinSession @PSBoundParameters -PassThru
[PSSession] $session = Initialize-WinSession -ComputerName $SessionComputerName -ConfigurationName $SessionConfigurationName -PassThru
if ($session.ComputerName -eq "localhost")
{
$newPath = $_.newPath
Expand Down Expand Up @@ -232,7 +232,8 @@ function Initialize-WinSession
$session = New-PSSession @newPSSessionParameters | Select-Object -First 1
if ($session.ComputerName -eq "localhost")
{
Invoke-Command $session { Set-Location $using:PWD }
$usingPath = (Get-Location).Path
Invoke-Command $session { Set-Location $using:usingPath }
}
}
else
Expand Down

0 comments on commit 7b76e65

Please sign in to comment.