diff --git a/bin/tmuxinator b/bin/tmuxinator index 59ec028..5901874 100755 --- a/bin/tmuxinator +++ b/bin/tmuxinator @@ -4,4 +4,4 @@ $:.unshift File.expand_path("../../lib/", __FILE__) require "thor" require "tmuxinator" -Tmuxinator::Cli.bootstrap *ARGV +Tmuxinator::Cli.bootstrap ARGV diff --git a/lib/tmuxinator/cli.rb b/lib/tmuxinator/cli.rb index aff3853..aec4735 100644 --- a/lib/tmuxinator/cli.rb +++ b/lib/tmuxinator/cli.rb @@ -364,7 +364,7 @@ module Tmuxinator # array or ARGV, not a varargs. Perhaps ::bootstrap should as well? # - ::start has a different purpose from #start and hence a different # signature - def self.bootstrap(*args) + def self.bootstrap(args = []) name = args[0] || nil if args.empty? && Tmuxinator::Config.local? Tmuxinator::Cli.new.local diff --git a/spec/lib/tmuxinator/cli_spec.rb b/spec/lib/tmuxinator/cli_spec.rb index 59c7792..4d88165 100644 --- a/spec/lib/tmuxinator/cli_spec.rb +++ b/spec/lib/tmuxinator/cli_spec.rb @@ -43,13 +43,13 @@ describe Tmuxinator::Cli do context "base thor functionality" do shared_examples_for :base_thor_functionality do it "supports -v" do - out, err = capture_io { cli.bootstrap("-v") } + out, err = capture_io { cli.bootstrap(["-v"]) } expect(err).to eq "" expect(out).to include(Tmuxinator::VERSION) end it "supports help" do - out, err = capture_io { cli.bootstrap("help") } + out, err = capture_io { cli.bootstrap(["help"]) } expect(err).to eq "" expect(out).to include("tmuxinator commands:") end @@ -65,7 +65,7 @@ describe Tmuxinator::Cli do end describe "::bootstrap" do - subject { cli.bootstrap(*args) } + subject { cli.bootstrap(args) } let(:args) { [] } shared_examples_for :bootstrap_with_arguments do