Skip to content

Commit

Permalink
Revert "Added commands to the beginning of the script to nullify any …
Browse files Browse the repository at this point in the history
…and all possible currently open BW CLI sessions."

This reverts commit f1ecd54.
  • Loading branch information
trparky committed Jan 17, 2024
1 parent bcc03bf commit 2ba7771
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Export-Bitwarden.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'Export-Bitwarden.psm1'

# Version number of this module.
ModuleVersion = '1.35'
ModuleVersion = '1.34'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
12 changes: 4 additions & 8 deletions Export-Bitwarden.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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 =="
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = ""
Expand Down

0 comments on commit 2ba7771

Please sign in to comment.