Skip to content

Commit

Permalink
Allow to disable scripts from command line
Browse files Browse the repository at this point in the history
  • Loading branch information
javalikescript committed Jul 6, 2024
1 parent cf8c56c commit b366b05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lha/Engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ return class.create(function(engine)

function engine:loadScriptExtensions()
if self.scriptsDir:isDirectory() then
self:loadExtensionsFromDirectory(self.scriptsDir, 'script')
if self.options.disableScripts then
logger:info('Script extensions disabled')
else
self:loadExtensionsFromDirectory(self.scriptsDir, 'script')
end
end
end

Expand Down
5 changes: 5 additions & 0 deletions lha/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
"minimum": 0,
"type": "integer"
},
"disableScripts": {
"default": false,
"title": "Disable the script extensions",
"type": "boolean"
},
"work": {
"default": "work",
"title": "The work directory",
Expand Down

0 comments on commit b366b05

Please sign in to comment.