File tree Expand file tree Collapse file tree 5 files changed +18
-2
lines changed
test/dummy/config/environments Expand file tree Collapse file tree 5 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ module Shipit
7171 :internal_hook_receivers ,
7272 :preferred_org_emails ,
7373 :task_execution_strategy ,
74- :task_logger
74+ :task_logger ,
75+ :use_git_askpass
7576 )
7677
7778 def task_execution_strategy
@@ -297,6 +298,12 @@ def task_logger
297298 @task_logger ||= Logger . new ( nil )
298299 end
299300
301+ def use_git_askpass?
302+ return @use_git_askpass unless @use_git_askpass . nil?
303+
304+ true
305+ end
306+
300307 protected
301308
302309 def revision_file
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def base_env
4141 'GITHUB_TOKEN' => github . token
4242 )
4343
44- unless Rails . env . development? || Rails . env . test ?
44+ if Shipit . use_git_askpass ?
4545 env [ 'GIT_ASKPASS' ] = Shipit ::Engine . root . join ( 'lib' , 'snippets' , 'git-askpass' ) . realpath . to_s
4646 end
4747
Original file line number Diff line number Diff line change 4848 # Raises helpful error messages.
4949 config . assets . raise_runtime_errors = true
5050
51+ # Disable git askpass in development
52+ Shipit . use_git_askpass = false
53+
5154 # Raises error for missing translations
5255 # config.action_view.raise_on_missing_translations = true
5356 if Rails . application . config_for ( :database ) &.dig ( 'adapter' ) == 'sqlite3'
Original file line number Diff line number Diff line change 7676
7777 # Do not dump schema after migrations.
7878 config . active_record . dump_schema_after_migration = false
79+
80+ # Make sure git askpass is enabled in production
81+ Shipit . use_git_askpass = true
7982end
Original file line number Diff line number Diff line change 3232 # Print deprecation notices to the stderr.
3333 config . active_support . deprecation = :stderr
3434
35+ # Disable git askpass in test
36+ Shipit . use_git_askpass = false
37+
3538 # Raises error for missing translations
3639 # config.action_view.raise_on_missing_translations = true
3740
You can’t perform that action at this time.
0 commit comments