|
68 | 68 |
|
69 | 69 | -- api check
|
70 | 70 |
|
71 |
| -du.check_min_api_version("9.3.0", "script_manager") |
| 71 | +-- du.check_min_api_version("9.3.0", "script_manager") |
72 | 72 |
|
73 | 73 | -- - - - - - - - - - - - - - - - - - - - - - - -
|
74 | 74 | -- C O N S T A N T S
|
75 | 75 | -- - - - - - - - - - - - - - - - - - - - - - - -
|
76 | 76 |
|
| 77 | +-- script_manager required API version |
| 78 | +local SM_API_VER_REQD <const> = "9.3.0" |
| 79 | + |
77 | 80 | -- path separator
|
78 | 81 | local PS <const> = dt.configuration.running_os == "windows" and "\\" or "/"
|
79 | 82 |
|
@@ -1189,7 +1192,7 @@ end
|
1189 | 1192 |
|
1190 | 1193 | script_manager_running_script = "script_manager"
|
1191 | 1194 |
|
1192 |
| -if check_for_updates then |
| 1195 | +if check_for_updates or SM_API_VER_REQD > dt.configuration.api_version_string then |
1193 | 1196 | local repo_data = get_repo_status(LUA_DIR)
|
1194 | 1197 | local current_branch = get_current_repo_branch(LUA_DIR)
|
1195 | 1198 | local clean = is_repo_clean(repo_data)
|
@@ -1246,14 +1249,15 @@ if check_for_updates then
|
1246 | 1249 |
|
1247 | 1250 | local match = false
|
1248 | 1251 |
|
1249 |
| - for _, branch in ipairs(branches) do |
| 1252 | + for _x, branch in ipairs(branches) do |
1250 | 1253 | log.msg(log.debug, "checking branch " .. branch .. " against API " .. LUA_API_VER)
|
1251 | 1254 |
|
1252 | 1255 | if LUA_API_VER == branch then
|
1253 | 1256 | match = true
|
1254 | 1257 | log.msg(log.info, "checking out repo branch " .. branch)
|
1255 | 1258 | checkout_repo_branch(repo, branch)
|
1256 |
| - log.msg(log.screen, "you must restart darktable to use the correct version of the lua") |
| 1259 | + log.msg(log.screen, _("you must restart darktable to use the correct version of the lua scripts")) |
| 1260 | + return |
1257 | 1261 | end
|
1258 | 1262 |
|
1259 | 1263 | end
|
|
0 commit comments