Skip to content

Commit

Permalink
chore: Handle garbage stderr output from Bitwarden CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Nov 15, 2023
1 parent 4a5f006 commit f86521c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/doctorcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (c *Config) runDoctorCmd(cmd *cobra.Command, args []string) error {
ifNotSet: checkResultWarning,
ifNotExist: checkResultInfo,
versionArgs: []string{"--version"},
versionRx: regexp.MustCompile(`^(\d+\.\d+\.\d+)`),
versionRx: regexp.MustCompile(`(?m)^(\d+\.\d+\.\d+)$`),
},
&binaryCheck{
name: "bitwarden-secrets-command",
Expand Down
4 changes: 3 additions & 1 deletion internal/cmd/testdata/scripts/doctor_unix.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ echo "(devel)"
-- bin/bw --
#!/bin/sh

echo "1.12.1"
echo '(node:84023) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.' 1>&2
echo '(Use `node --trace-deprecation ...` to show where the warning was created)' 1>&2
echo "2023.10.0"
-- bin/bws --
#!/bin/sh

Expand Down

0 comments on commit f86521c

Please sign in to comment.