Skip to content

Commit

Permalink
fix(cli): Suppress deprecation message for internal shims
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Aug 6, 2022
1 parent 830bda5 commit b339e27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/sile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,10 @@ end

function SILE.registerCommand (name, func, help, pack, cheat)
local class = SILE.documentState.documentClass
SU.deprecated("SILE.registerCommand", "class:registerCommand", "0.14.0", "0.16.0",
[[Commands are being scoped to the document classes they are loaded into rather than being globals.]])
if not cheat then
SU.deprecated("SILE.registerCommand", "class:registerCommand", "0.14.0", "0.16.0",
[[Commands are being scoped to the document classes they are loaded into rather than being globals.]])
end
-- Shimming until we have all scope cheating removed from core
if not cheat or not class or class.type ~= "class" then
return SILE.classes.base.registerCommand(nil, name, func, help, pack)
Expand Down

0 comments on commit b339e27

Please sign in to comment.