Skip to content

Commit 83ce4ae

Browse files
authored
Merge pull request #176 from codykonior/master
Save and restore $env:PSModulePath until we find why it's being clobbered on PS Core
2 parents 39d4520 + 85842f7 commit 83ce4ae

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

PoshRSJob/PoshRSJob.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
#
33
# PoshRSJob
4-
# Version 1.7.4.3
4+
# Version 1.7.4.4
55
#
66
# Boe Prox (c) 2014
77
# http://learn-powershell.net
@@ -14,7 +14,7 @@
1414
ModuleToProcess = 'PoshRSJob.psm1'
1515

1616
# Version number of this module.
17-
ModuleVersion = '1.7.4.3'
17+
ModuleVersion = '1.7.4.4'
1818

1919
# ID used to uniquely identify this module
2020
GUID = '9b17fb0f-e939-4a5c-b194-3f2247452972'

PoshRSJob/PoshRSJob.psm1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ New-Variable PoshRS_RunspacePoolCleanup -Value ([hashtable]::Synchronized(@{}))
115115
Write-Verbose "Creating routine to monitor RS jobs"
116116
$PoshRS_jobCleanup.Flag=$True
117117
$PoshRS_jobCleanup.Host = $Host
118+
$PSModulePath = $env:PSModulePath
118119
$PoshRS_jobCleanup.Runspace =[runspacefactory]::CreateRunspace()
119120
$PoshRS_jobCleanup.Runspace.Open()
120121
$PoshRS_jobCleanup.Runspace.SessionStateProxy.SetVariable("PoshRS_jobCleanup",$PoshRS_jobCleanup)
@@ -319,4 +320,6 @@ $ExportModule = @{
319320
Variable = @('PoshRS_JobId','PoshRS_Jobs','PoshRS_jobCleanup','PoshRS_RunspacePoolCleanup','PoshRS_RunspacePools')
320321
}
321322
Export-ModuleMember @ExportModule
322-
#endregion Export Module Members
323+
#endregion Export Module Members
324+
325+
$env:PSModulePath = $PSModulePath

PoshRSJob/Public/Start-RSJob.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ Function Start-RSJob {
511511
Else {
512512
Write-Verbose "Creating new runspacepool <$Batch>"
513513
$RunspacePoolID = $Batch
514+
$PSModulePath = $env:PSModulePath
514515
$RunspacePool = [runspacefactory]::CreateRunspacePool($InitialSessionState)
515516
If ($RunspacePool.psobject.Properties["ApartmentState"]) {
516517
#ApartmentState doesn't exist in Nano Server
@@ -530,6 +531,7 @@ Function Start-RSJob {
530531

531532
#[System.Threading.Monitor]::Enter($PoshRS_RunspacePools.syncroot) #Temp add
532533
[void]$PoshRS_RunspacePools.Add($RSPObject)
534+
$env:PSModulePath = $PSModulePath
533535
}
534536
}
535537
finally {

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PoshRSJob 1.7.4.3
1+
PoshRSJob 1.7.4.4
22

33
[![Build status](https://ci.appveyor.com/api/projects/status/svrd4ho4otugki24?svg=true)](https://ci.appveyor.com/project/proxb/poshrsjob) [![Join the chat at https://gitter.im/proxb/PoshRSJob](https://badges.gitter.im/proxb/PoshRSJob.svg)](https://gitter.im/proxb/PoshRSJob?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44

@@ -11,8 +11,8 @@ Provides an alternative to PSjobs with greater performance and less overhead to
1111
Install-Module -Name PoshRSJob
1212
```
1313

14-
#### Download the latest release (1.7.4.3)
15-
https://github.com/proxb/PoshRSJob/releases/download/1.7.4.3/PoshRSJob.zip
14+
#### Download the latest release (1.7.4.4)
15+
https://github.com/proxb/PoshRSJob/releases/download/1.7.4.4/PoshRSJob.zip
1616

1717

1818
More information and examples here: http://learn-powershell.net/2015/04/19/latest-updates-to-poshrsjob/

ReleaseNotes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---------
2+
|1.7.4.4|
3+
---------
4+
* #175 Save and restore $env:PSModulePath until we find why it's being clobbered on PS Core
5+
16
---------
27
|1.7.4.3|
38
---------

0 commit comments

Comments
 (0)