PowerShell_Scripts/BitWarden/profile.d/env.ps1
Gal on Sygin c0131deba4 Introduction of BitWarden package + prep
+ BitWarden module for easy autologon (not very secure but convinent on
  personal machines) - Will think this over some more afterwards
* Get-Path will always return without trailing directory separator
  (might want to make this 'always' for dirs, but unsure yet)
+ Added Edit-MountUnit scaffolding for later modifying it to import a
  template on new mount units, and easy edit of systemd mount and
  automount units.
2022-02-03 19:08:16 -05:00

10 lines
No EOL
378 B
PowerShell

if( -not (Test-Path env:BITWARDEN_CLI_PATH) ) {
$env:BITWARDEN_CLI_PATH = Get-Command bw -Type Application | Select-Object -First 1 -ExpandProperty Source
}
$local:bwPath = Join-Path $HOME 'tmp'
$null = New-Item -ItemType Directory -Path $bwPath -Force
$bwPath = Join-Path $bwPath 'git-credential-bw.key'
if( Test-Path $bwPath ) {
$env:BW_SESSION= Get-Content $bwPath
}