Skip to content

Commit

Permalink
colima: add service block (Homebrew#94189)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickHackman authored Feb 1, 2022
1 parent 418b698 commit d0d72b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Formula/colima.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ def install
(fish_completion/"colima.fish").write Utils.safe_popen_read(bin/"colima", "completion", "fish")
end

service do
run [opt_bin/"colima", "start"]
keep_alive true
environment_variables HOME: ENV["HOME"], PATH: std_service_path_env
error_log_path var/"log/colima.log"
log_path var/"log/colima.log"
working_dir ENV["HOME"]
end

test do
assert_match version.to_s, shell_output("#{bin}/colima version 2>&1")
assert_match "colima is not running", shell_output("#{bin}/colima status 2>&1", 1)
Expand Down

0 comments on commit d0d72b5

Please sign in to comment.