Skip to content

Commit

Permalink
fix: fix postal version command
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Jun 20, 2024
1 parent d510499 commit 4fa88ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/postal/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def change_database_connection_pool_size(new_size)
ActiveRecord::Base.connection_pool.disconnect!

config = ActiveRecord::Base.configurations
.configs_for(env_name: Rails.env)
.configs_for(env_name: Config.rails.environment)
.first
.configuration_hash

Expand Down Expand Up @@ -173,7 +173,7 @@ def version
private

def read_version_file(file)
path = Rails.root.join(file)
path = File.expand_path("../../../" + file, __FILE__)
return unless File.exist?(path)

value = File.read(path).strip
Expand Down
2 changes: 1 addition & 1 deletion script/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require File.expand_path("../lib/postal/version", __dir__)
require File.expand_path("../lib/postal/config", __dir__)
puts Postal.version

0 comments on commit 4fa88ac

Please sign in to comment.