Skip to content

"disable scripts" in script manager needs update for 5.6 #701

Description

@anoderay

Description
The disable scripts button in the scripts module renames <config_dir>/luarc to luarc.disabled (the disable_scripts button callback in tools/script_manager.lua). This worked before the scripts were bundled, when darktable used <config_dir>/luarc as the Lua entry point.

Since 5.6, darktable loads the bundled luarc, which calls require "tools/script_manager" regardless of config_dir/luarc existing or not. Renaming config_dir/luarc no longer disables the scripts. It only prevents the user's own config_dir/luarc from being re-run. The bundled scripts still load and start.

Steps to reproduce

use darktable 5.6 with bundled scripts.
scripts module / action: install/update scripts / enable "disable scripts" button / click disable scripts.
observe luarc being renamed in the config dir

Restart darktable.

Expected: the Lua scripts are disabled.
Observed: bundled scripts still load and run.

Possible fixes
The current way to disable the scripts is the disable Lua scripts preference.
a) have the button toggle the disable_scripts preference (with the checkbox as the re-enable path)
b) remove the button in favour of the preference

I'd favour the latter - then enabling/disabling lua scripts is reduced to the preferences.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions