From 2ba77715a676821b29531a9a40ca28b9863db9f7 Mon Sep 17 00:00:00 2001 From: Thomas Parkison Date: Tue, 16 Jan 2024 20:49:01 -0500 Subject: [PATCH] Revert "Added commands to the beginning of the script to nullify any and all possible currently open BW CLI sessions." This reverts commit f1ecd54a9bc2e7aabae4fc3af7194600d86e43c3. --- Export-Bitwarden.psd1 | 2 +- Export-Bitwarden.psm1 | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Export-Bitwarden.psd1 b/Export-Bitwarden.psd1 index 157f222..9837b98 100644 --- a/Export-Bitwarden.psd1 +++ b/Export-Bitwarden.psd1 @@ -12,7 +12,7 @@ RootModule = 'Export-Bitwarden.psm1' # Version number of this module. -ModuleVersion = '1.35' +ModuleVersion = '1.34' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/Export-Bitwarden.psm1 b/Export-Bitwarden.psm1 index b2b137f..269ff77 100644 --- a/Export-Bitwarden.psm1 +++ b/Export-Bitwarden.psm1 @@ -26,18 +26,12 @@ function Export-Bitwarden { # Don't touch this line! $currentLocation = Get-Location - if ($IsWindows) { $bwCliBinName = (Join-Path $PSScriptRoot "bw.exe") } - else { $bwCliBinName = (Join-Path $PSScriptRoot "bw") } - - & $bwCliBinName logout | Out-Null - $env:BW_SESSION = "" - try { # ==================================================== # == WARNING!!! DO NOT TOUCH ANYTHING BELOW THIS!!! == # ==================================================== - $ver = "1.35" + $ver = "1.34" Write-Host -ForegroundColor Green "========================================================================================" Write-Host -ForegroundColor Green "== Bitwarden Vault Export Script v$ver ==" @@ -163,6 +157,9 @@ function Export-Bitwarden { # Don't touch this line! Write-Host "" } + if ($IsWindows) { $bwCliBinName = (Join-Path $PSScriptRoot "bw.exe") } + else { $bwCliBinName = (Join-Path $PSScriptRoot "bw") } + if (!(Test-Path -Path $bwCliBinName)) { Write-Host "Bitwarden CLI application not found, downloading... Please Wait." -NoNewLine DownloadBWCli @@ -382,7 +379,6 @@ function Export-Bitwarden { # Don't touch this line! Write-Host -ForegroundColor Green "Script completed." } finally { - & $bwCliBinName logout | Out-Null $env:BW_SESSION = "" $bwPasswordEncrypted = "" $bwPasswordPlainText = ""