Skip to content

Commit

Permalink
Don't check version if path is present
Browse files Browse the repository at this point in the history
  • Loading branch information
Gigitsu committed Jul 23, 2024
1 parent e2d8d3b commit 2b7417e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Config

config :tailwind,
version: "3.2.7",
version: "3.4.6",
another: [
args: ["--help"]
]
9 changes: 6 additions & 3 deletions lib/tailwind.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Tailwind do
# https://github.com/tailwindlabs/tailwindcss/releases
@latest_version "3.2.7"
@latest_version "3.4.6"

@moduledoc """
Tailwind is an installer and runner for [tailwind](https://tailwindcss.com/).
Expand Down Expand Up @@ -68,7 +68,7 @@ defmodule Tailwind do

@doc false
def start(_, _) do
unless Application.get_env(:tailwind, :version) do
unless Application.get_env(:tailwind, :version) or Application.get_env(:tailwind, :path) do
Logger.warning("""
tailwind version is not configured. Please set it in your config files:
Expand Down Expand Up @@ -103,7 +103,10 @@ defmodule Tailwind do
Returns the configured tailwind version.
"""
def configured_version do
Application.get_env(:tailwind, :version, latest_version())
default_version =
if Application.get_env(:tailwind, :path), do: bin_version(), else: latest_version()

Application.get_env(:tailwind, :version, default_version)
end

@doc """
Expand Down

0 comments on commit 2b7417e

Please sign in to comment.