-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Description
Environment
MacOS m4
Elixir: 1.18.4 (compiled with Erlang/OTP 27)
phoenix: 1.8.rc3
phoenix_tailwind` version: 0.3
Problem
When phoenix_tailwind fails to download the Tailwind CLI binary (e.g., due to network issues), the displayed error message provides ambiguous and potentially misleading instructions for manually placing the binary.
Actual behavior
- When a download fails (e.g., for
mix assets.setupormix tailwind.install --if-missing), the error message contains the line:Manually download the executable from the URL above and place it inside "_build/tailwind-macos-arm64" - This instruction is misleading because:
- "Place it inside
_build/tailwind-macos-arm64" implies_build/tailwind-macos-arm64is a directory. However,Tailwind.bin_path()refers to the full file path (e.g.,_build/tailwind-macos-arm64). - The downloaded binary from GitHub is often named
tailwindcss-macos-arm64, but the library expects it to betailwind-macos-arm64atbin_path(). This renaming isn't mentioned.
- "Place it inside
- Following the literal misleading instruction (or not renaming the file) can lead to the binary not being found or correctly recognized by
Tailwind.bin_version(), causing commands to re-attempt download or fail.
Expected behavior
The error message should provide clear and unambiguous instructions for manual binary placement. This includes:
- Explicitly stating that the target is a full file path, not a directory.
- Clarifying the expected filename (e.g.,
tailwind-macos-arm64) if it differs from the download name (e.g.,tailwindcss-macos-arm64).
Example of desired clarity:
"Manually download the executable from the URL above and place it at the specific path: \"_build/tailwind-#{configured_target()}\" (Note: The downloaded file may need to be renamed to 'tailwind-#{configured_target()}' if it has a 'tailwindcss-' prefix.)"
Metadata
Metadata
Assignees
Labels
No labels