Skip to content

Commit

Permalink
設定檔壞了?放棄任務。
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Apr 2, 2024
1 parent 5cce08b commit 3962692
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion routine/20200122.update_vital_articles.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ async function adapt_configuration(latest_task_configuration) {
const icon_order = [];
for (let item of general.icons_schema) {
if (typeof item !== 'string') {
// 設定檔壞了?放棄任務。
throw new Error('Invalid icons_schema: ' + item);
CeL.error('Invalid icons_schema: ' + item);
continue;
}
Expand Down Expand Up @@ -594,7 +596,8 @@ async function main_process() {
if (wiki.latest_task_configuration.general.modify_talk_pages) {
const talk_pages_to_edit = Object.keys(have_to_edit_its_talk_page).length;
if (talk_pages_to_edit > wiki.latest_task_configuration.general.talk_page_limit_for_editing
&& !do_PIQA && !CeL.env.arg_hash?.forced_edit) {
//&& !do_PIQA
&& !CeL.env.arg_hash?.forced_edit) {
no_editing_of_talk_pages = true;
CeL.warn(`編輯談話頁面數量${talk_pages_to_edit}篇,超越編輯數量上限${wiki.latest_task_configuration.general.talk_page_limit_for_editing}。執行時請設定命令列參數 forced_edit 以強制編輯。`);
} else {
Expand Down

0 comments on commit 3962692

Please sign in to comment.