Skip to content

Commit 9285405

Browse files
authored
ruby gem: invoke overmind using exec (#178)
1 parent a990724 commit 9285405

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

packaging/rubygems/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
overmind (0.1.2)
4+
overmind (2.5.1)
55

66
GEM
77
remote: https://rubygems.org/

packaging/rubygems/bin/overmind

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ require 'overmind/cli'
55

66
begin
77
cli = Overmind::CLI.new
8-
exit_code = cli.run(ARGV)
9-
exit exit_code
8+
cli.run(ARGV)
109
rescue StandardError => e
1110
warn e.message
1211
exit 1

packaging/rubygems/lib/overmind/cli.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ def run(args = [])
2323
# Use prebuild tmux if found
2424
path_with_tmux = File.exist?(TMUX_PATH) ? "#{TMUX_FOLDER_PATH}:#{ENV["PATH"]}" : ENV["PATH"]
2525

26-
# Spawns the Overmind process with modified PATH if necessary
27-
pid = spawn({"PATH" => path_with_tmux}, "#{OVERMIND_PATH} #{args.join(" ")}")
28-
29-
Process.wait(pid)
30-
31-
$?.exitstatus
26+
# exec the Overmind process with modified PATH if necessary
27+
exec({"PATH" => path_with_tmux}, "#{OVERMIND_PATH} #{args.join(" ")}")
3228
end
3329

3430
private
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Overmind
4-
VERSION = "2.5.0"
4+
VERSION = "2.5.1"
55
end

0 commit comments

Comments
 (0)