Skip to content

Commit

Permalink
Replace Path.dirname(__ENV__.file) with __DIR__ in SQLite config (#5719)
Browse files Browse the repository at this point in the history
Use the frequently seen shortcut for new apps.
  • Loading branch information
rhcarvalho committed Feb 23, 2024
1 parent fabf229 commit f9fc22b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions installer/lib/phx_new/generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@ defmodule Phx.New.Generator do
defp fs_db_config(app, module) do
[
dev: [
database: {:literal, ~s|Path.expand("../#{app}_dev.db", Path.dirname(__ENV__.file))|},
database: {:literal, ~s|Path.expand("../#{app}_dev.db", __DIR__)|},
pool_size: 5,
stacktrace: true,
show_sensitive_data_on_connection_error: true
],
test: [
database: {:literal, ~s|Path.expand("../#{app}_test.db", Path.dirname(__ENV__.file))|},
database: {:literal, ~s|Path.expand("../#{app}_test.db", __DIR__)|},
pool_size: 5,
pool: Ecto.Adapters.SQL.Sandbox
],
Expand Down

0 comments on commit f9fc22b

Please sign in to comment.