8000 bitwarden-cli 2025.5.0 · Homebrew/homebrew-core@9ad1f51 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9ad1f51

Browse files
BrewTestBotdaeho-ro
authored andcommitted
bitwarden-cli 2025.5.0
1 parent 58188f7 commit 9ad1f51

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

Formula/b/bitwarden-cli.rb

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class BitwardenCli < Formula
22
desc "Secure and free password manager for all of your devices"
33
homepage "https://bitwarden.com/"
4-
url "https://github.com/bitwarden/clients/archive/refs/tags/cli-v2025.2.0.tar.gz"
5-
sha256 "2c31f8f66e197d5bcbc656c258d4556c97e49a940cabad3ec76ff3742b5252c7"
4+
url "https://github.com/bitwarden/clients/archive/refs/tags/cli-v2025.5.0.tar.gz"
5+
sha256 "247ca881c8a9f407c494977f7e8555fe11beff017d0cfda6a6d437ec0c0978d6"
66
license "GPL-3.0-only"
77

88
livecheck do
@@ -23,12 +23,25 @@ class BitwardenCli < Formula
2323
depends_on "node"
2424

2525
def install
26-
system "npm", "ci", "--ignore-scripts"
26+
# Fix to build error with xcode 16.3 for `argon2`
27+
# Issue ref:
28+
# - https://github.com/bitwarden/clients/issues/15000
29+
# - https://github.com/ranisalt/node-argon2/issues/448
30+
inreplace "package.json", '"argon2": "0.41.1"', '"argon2": "0.43.0"'
31+
inreplace "apps/cli/package.json", '"argon2": "0.41.1"', '"argon2": "0.43.0"'
32+
33+
# Fix to Error: Cannot find module 'semver'
34+
# PR ref: https://github.com/bitwarden/clients/pull/15005
35+
system "npm", "install", "semver", *std_npm_args
36+
system "npm", "install", *std_npm_args
2737

2838
cd buildpath/"apps/cli" do
2939
# The `oss` build of Bitwarden is a GPL backed build
3040
system "npm", "run", "build:oss:prod", "--ignore-scripts"
3141
cd "./build" do
42+
# Fix to Error: Cannot find module 'semver'
43+
# PR ref: https://github.com/bitwarden/clients/pull/15005
44+
system "npm", "install", "semver", *std_npm_args
3245
system "npm", "install", *std_npm_args
3346
bin.install_symlink Dir[libexec/"bin/*"]
3447
end
@@ -37,10 +50,13 @@ def install
3750
# Remove incompatible pre-built `argon2` binaries
3851
os = OS.kernel_name.downcase
3952
arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s
40-
node_modules = libexec/"lib/node_modules/@bitwarden/cli/node_modules"
41-
(node_modules/"argon2/prebuilds/linux-arm64/argon2.armv8.musl.node").unlink
42-
(node_modules/"argon2/prebuilds/linux-x64/argon2.musl.node").unlink
43-
(node_modules/"argon2/prebuilds").each_child { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" }
53+
base = (libexec/"lib/node_modules/@bitwarden")
54+
universals = "{@microsoft/signalr/node_modules/utf-8-validate,bufferutil,utf-8-validate}"
55+
base.glob("clients/node_modules/#{universals}/prebuilds/{darwin-x64+arm64,linux-x64}/*.node").each(&:unlink)
56+
base.glob("{cli,clients}/node_modules/argon2/prebuilds") do |path|
57+
path.glob("**/*.musl.node").each(&:unlink)
58+
path.children.each { |dir| rm_r(dir) if dir.directory? && dir.basename.to_s != "#{os}-#{arch}" }
59+
end
4460

4561
generate_completions_from_executable(bin/"bw", "completion", shells: [:zsh], shell_parameter_format: :arg)
4662
end

0 commit comments

Comments
 (0)
0