replace try/catch with File.Exists? in dev.exs
authorrinpatch <rinpatch@sdf.org>
Sat, 1 Dec 2018 14:38:45 +0000 (17:38 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 1 Dec 2018 14:38:45 +0000 (17:38 +0300)
config/dev.exs

index 7b06ad67ece9541d79fd20c28f8c2e68cf5f984a..166be721aade416f6d73c07d334c2ed517541319 100644 (file)
@@ -49,11 +49,10 @@ config :pleroma, Pleroma.Repo,
   hostname: "localhost",
   pool_size: 10
 
-try do
+if File.exists?("./config/dev.secret.exs") do
   import_config "dev.secret.exs"
-rescue
-  _ ->
-    IO.puts(
-      "!!! RUNNING IN LOCALHOST DEV MODE! !!!\nFEDERATION WON'T WORK UNTIL YOU CONFIGURE A dev.secret.exs"
-    )
+else
+  IO.puts(
+    "!!! RUNNING IN LOCALHOST DEV MODE! !!!\nFEDERATION WON'T WORK UNTIL YOU CONFIGURE A dev.secret.exs"
+  )
 end