Skip to content
Merged
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
5 changes: 4 additions & 1 deletion lib/hanami/cli/commands/app/db/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ def re_run_development_command_in_test
# Re-runs in test are for development-env commands only.
return unless Hanami.env == :development

# Re-runs have been intentionally switched off
return if ENV.fetch("HANAMI_CLI_DB_COMMAND_RE_RUN_IN_TEST", "true") != "true"

cmd = $0
cmd = "bundle exec #{cmd}" if ENV.key?("BUNDLE_BIN_PATH")

Expand All @@ -192,7 +195,7 @@ def re_run_development_command_in_test
end

def re_running_in_test?
ENV.key?("HANAMI_CLI_DB_COMMAND_RE_RUN_IN_TEST")
ENV["HANAMI_CLI_DB_COMMAND_RE_RUN_IN_TEST"] == "true"
end

# Returns the `ARGV` with every option argument included, but the `-e` or `--env` args
Expand Down
Loading