lib/hanami/cli/commands/app/command.rb in hanami-cli-2.0.0 vs lib/hanami/cli/commands/app/command.rb in hanami-cli-2.0.1
- old
+ new
@@ -1,8 +1,9 @@
# frozen_string_literal: true
require "dry/files"
+require "hanami/env"
require_relative "db/utils/database"
module Hanami
module CLI
module Commands
@@ -32,10 +33,11 @@
env = opts[:env]
hanami_env = env ? env.to_s : ENV.fetch("HANAMI_ENV", "development")
ENV["HANAMI_ENV"] = hanami_env
+ Hanami::Env.load
super(*args, **opts)
end
end
@@ -112,10 +114,10 @@
# This is NOT AVAILABLE as of the 2.0.0 release.
#
# @api private
def database
- @database ||= Commands::DB::Utils::Database[app]
+ @database ||= Commands::App::DB::Utils::Database[app]
end
# This is NOT AVAILABLE as of the 2.0.0 release.
#
# @api private