Skip to content

Commit

Permalink
fix bitwarden env variables missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebot committed Apr 12, 2024
1 parent 2b34efd commit 9fedc0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smol_k8s_lab/bitwarden/bw_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ def unlock(self) -> None:
self.delete_session = False

status = self.status()

# login if we need to
if status == "unauthenticated":
if status == "locked" or status == "unauthenticated":
env = {"BW_PASSWORD": self.password,
"BW_CLIENTID": self.client_id,
"BW_CLIENTSECRET": self.client_secret,
Expand All @@ -114,6 +112,8 @@ def unlock(self) -> None:
"HOME": self.env['HOME'],
"NODE_OPTIONS": "--no-deprecation"}

# login if we need to
if status == "unauthenticated":
log.info('Logging into the Bitwarden vault...')
# set command to login if we're unauthenticated
cmd = f"{self.bw_path} login --passwordenv BW_PASSWORD --apikey --raw"
Expand Down

0 comments on commit 9fedc0a

Please sign in to comment.