Skip to content

Commit

Permalink
Version bump with $HOME fix.
Browse files Browse the repository at this point in the history
$HOME is not an environment variable.  Replaced `$env:HOME` with $HOME.
  • Loading branch information
rhymeswithmogul committed Feb 10, 2022
1 parent c106a0d commit 2ba049c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PSGemini ChangeLog

## Version 1.0.1
## Version 1.0.2 and 1.0.1
If `$env:PSGeminiTOFUPath` was not defined, certificates could not be reliably added or removed. This has been corrected by checking for null or undefined values.

## Version 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION 1.0.1
VERSIONS 1.0.2 and 1.0.1
Fixed certificate store issues that slipped past the cracks.

VERSION 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion PSGemini.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'src/PSGemini.psm1'

# Version number of this module.
ModuleVersion = '1.0.1'
ModuleVersion = '1.0.2'

# Supported PSEditions
CompatiblePSEditions = @('Core', 'Desktop')
Expand Down
6 changes: 3 additions & 3 deletions src/PSGemini.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Function Get-PSGeminiKnownCertificates {
)

Write-Debug "Looking for a certificate for $HostName."
$env:PSGeminiTOFUPath ??= (Join-Path -Path $env:HOME -ChildPath '.PSGemini_known_hosts.csv')
$env:PSGeminiTOFUPath ??= (Join-Path -Path $HOME -ChildPath '.PSGemini_known_hosts.csv')

If (Test-Path -Path $env:PSGeminiTOFUPath -PathType Leaf) {
Write-Debug "Found a certificate store at ${env:PSGeminiTOFUPath}."
Expand Down Expand Up @@ -558,7 +558,7 @@ Function Add-PSGeminiKnownCertificate {

Write-Verbose "Memorizing certificate for $HostName with fingerprint $Fingerprint and expiration date $ExpirationDate."

$env:PSGeminiTOFUPath ??= (Join-Path -Path $env:HOME -ChildPath '.PSGemini_known_hosts.csv')
$env:PSGeminiTOFUPath ??= (Join-Path -Path $HOME -ChildPath '.PSGemini_known_hosts.csv')
Export-CSV -Path $env:PSGeminiTOFUPath -Append -Delimiter ',' -InputObject ([PSCustomObject]@{
HostName = $HostName
Fingerprint = $Fingerprint
Expand All @@ -579,7 +579,7 @@ Function Remove-PSGeminiKnownCertificate {
[String] $Fingerprint
)

$env:PSGeminiTOFUPath ??= (Join-Path -Path $env:HOME -ChildPath '.PSGemini_known_hosts.csv')
$env:PSGeminiTOFUPath ??= (Join-Path -Path $HOME -ChildPath '.PSGemini_known_hosts.csv')

If (-Not (Test-Path -Path $env:PSGeminiTOFUPath -PathType Leaf)) {
Return $null
Expand Down

0 comments on commit 2ba049c

Please sign in to comment.