Skip to content

Commit

Permalink
Use Homebrew's prefix when writing nginx config
Browse files Browse the repository at this point in the history
In order to support both Intel and M1 architectures, we need to use
`brew --prefix` when determining where to write the local server config.
  • Loading branch information
DanOlson authored and swandog30 committed Jan 5, 2023
1 parent ce73d17 commit a2f4ead
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/install_nginx_conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
require 'fileutils'
require 'erb'

brew_prefix = `brew --prefix`.strip
app_root = File.expand_path('../..', __FILE__)
config_template_path = File.join(app_root, 'config/local-nginx.conf.erb')
nginx_servers_path = '/usr/local/etc/nginx/servers'
nginx_servers_path = "#{brew_prefix}/etc/nginx/servers"
nginx_config_path = File.join(nginx_servers_path, 'mdl.conf')

FileUtils.mkdir_p(nginx_servers_path)
Expand Down

0 comments on commit a2f4ead

Please sign in to comment.