Skip to content

Commit

Permalink
Set gemfile for error
Browse files Browse the repository at this point in the history
  • Loading branch information
xjunior committed Jan 24, 2025
1 parent 4401942 commit 79bd2ed
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 30 deletions.
7 changes: 4 additions & 3 deletions template-dir/hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/overcommit-hook
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/post-commit
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/post-rewrite
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/pre-rebase
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down
7 changes: 4 additions & 3 deletions template-dir/hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ if hook_type == 'overcommit-hook'
end

# Check if Overcommit should invoke a Bundler context for loading gems
config = File.read('.overcommit.yml')
config = File.read('.overcommit.yml') =~ /gemfile: "?(.*)"?/
gemfile = Regexp.last_match(1)

if config =~ /gemfile: "?(.*)"?/
ENV['BUNDLE_GEMFILE'] = Regexp.last_match(1)
if gemfile
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'

begin
Expand Down

0 comments on commit 79bd2ed

Please sign in to comment.