Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Fix use Bundler.with_clean_env #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Capfile.repos
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,20 @@ colorize [
{ :match => /executing command/, :color => :blue, :prio => 10, :attribute => :underscore },
{ :match => /^transaction: commit$/, :color => :magenta, :prio => 10, :attribute => :blink },
{ :match => /git/, :color => :white, :prio => 20, :attribute => :reverse },
]
]

on :load do
# MonkeyPatch run_locally so that we use Bundler.with_clean_env
# logs the command then executes it locally.

# returns the command output as a string
def run_locally_with_bundler_clean_env(cmd)
Bundler.with_clean_env do
run_locally_without_bundler_clean_env(cmd)
end
end

alias run_locally_without_bundler_clean_env run_locally
alias run_locally run_locally_with_bundler_clean_env

end