Skip to content

Commit 0b86fd2

Browse files
committed
ra-multiplex: Fix service definition
- Fix $PATH - Log properly - Set rust and rust-analyzer as optional dependencies Reference: https://rubydoc.brew.sh/Homebrew/Service.html
1 parent 57fe099 commit 0b86fd2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Formula/ra-multiplex.rb

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class RaMultiplex < Formula
1414
sha256 cellar: :any_skip_relocation, x86_64_linux: "8c52e9bcda7b35d91976d2bb4e8b0fe8ecc7273a704930bac4de3a22b90b3824"
1515
end
1616

17-
depends_on "rust" => :build
17+
# They're optional dependencies since many users use rustup.
18+
depends_on "rust" => [:build, :optional]
19+
depends_on "rust-analyzer" => :optional
1820

1921
def install
2022
system "cargo", "install", *std_cargo_args
@@ -23,5 +25,10 @@ def install
2325
service do
2426
run [opt_bin/"ra-multiplex", "server"]
2527
keep_alive true
28+
error_log_path var/"log/ra-multiplex.log"
29+
log_path var/"log/ra-multiplex.log"
30+
31+
# Need cargo and rust-analyzer in PATH
32+
environment_variables PATH: "#{Dir.home}/.cargo/bin:#{std_service_path_env}"
2633
end
2734
end

0 commit comments

Comments
 (0)