Skip to content

Commit

Permalink
fix #494: interactive use of runic plugin (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub authored Jan 22, 2025
1 parent 1b5bd08 commit f9a88a4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/plugins/formatter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ end

struct Runic{T} <: Plugin end

function validate(::Runic{T}, ::Template) where {T}
if T !== GitHubActions
throw(ArgumentError("Only GitHubActions is supported for Runic at the moment."))
Runic() = Runic{GitHubActions}()

function validate(::Runic{T}, t::Template) where {T}
if T === GitHubActions
hasplugin(t, T) || throw(ArgumentError("Runic: The GitHubActions plugin must be included"))
else
throw(ArgumentError("Runic: Only GitHubActions is supported at the moment"))
end
end

0 comments on commit f9a88a4

Please sign in to comment.