From 49fb5a6a61d00627ca0a0adfdddcb8af240c2e5a Mon Sep 17 00:00:00 2001 From: "Lin, Hung-Shin" Date: Sun, 26 Nov 2023 18:32:06 +0800 Subject: [PATCH] fix: Remove exceptions from stages --- quests/cast/game.yml | 16 ++++++++-------- quests/copy/game.yml | 8 -------- quests/create/game.yml | 9 +-------- quests/exceptions.yml | 8 ++++++++ quests/explore/game.yml | 8 -------- quests/get-started/game.yml | 16 ---------------- quests/move/game.yml | 8 -------- quests/path/game.yml | 8 -------- quests/read/game.yml | 8 -------- quests/remove/game.yml | 8 -------- 10 files changed, 17 insertions(+), 80 deletions(-) create mode 100644 quests/exceptions.yml diff --git a/quests/cast/game.yml b/quests/cast/game.yml index 4c6f229..3482ee4 100644 --- a/quests/cast/game.yml +++ b/quests/cast/game.yml @@ -9,14 +9,6 @@ requirements: - get-started stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始教程 condition: @@ -73,3 +65,11 @@ stages: - 你成功的在終端機上顯示了 `How are you?`。 - 相信你已經了解如何使用 `echo` 指令來顯示文字了。 - 之後如果要在終端機顯示文字,記得可以使用 `echo` 指令。 + +exceptions: + - repeatable: true + condition: + command: + - ' ' + hints: + - '!! 請勿使用全形空格 !!' diff --git a/quests/copy/game.yml b/quests/copy/game.yml index d48d0e8..15eda11 100644 --- a/quests/copy/game.yml +++ b/quests/copy/game.yml @@ -9,14 +9,6 @@ requirements: - create stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始 condition: diff --git a/quests/create/game.yml b/quests/create/game.yml index 41bcb13..647b41e 100644 --- a/quests/create/game.yml +++ b/quests/create/game.yml @@ -10,14 +10,6 @@ requirements: - read stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始 condition: @@ -68,6 +60,7 @@ stages: - ➤ 輸入 `cat hello.txt` 來查看 `hello.txt` 檔案的內容 - id: cat + task: 使用 `cat` 指令來查看 `hello.txt` 檔案的內容 condition: command: - ^cat hello.txt$ diff --git a/quests/exceptions.yml b/quests/exceptions.yml new file mode 100644 index 0000000..872c30b --- /dev/null +++ b/quests/exceptions.yml @@ -0,0 +1,8 @@ +exceptions: + - id: warning-02 + repeatable: true + condition: + command: + - '`' + hints: + - '!! 不需要輸入上下引號 !!' diff --git a/quests/explore/game.yml b/quests/explore/game.yml index 707c39b..977e1b2 100644 --- a/quests/explore/game.yml +++ b/quests/explore/game.yml @@ -10,14 +10,6 @@ requirements: - get-started stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始教程 condition: diff --git a/quests/get-started/game.yml b/quests/get-started/game.yml index 3d09d66..9fd00fb 100644 --- a/quests/get-started/game.yml +++ b/quests/get-started/game.yml @@ -9,22 +9,6 @@ instruction: | 請你在終端機中的 `commander:~ $` 後面輸入 `echo start` 並按下 Enter 來開始教程。 stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - - id: warning-02 - repeatable: true - condition: - command: - - '`' - hints: - - '!! 不需要輸入上下引號 !!' - - id: start task: 輸入 `echo start` 來開始教程 condition: diff --git a/quests/move/game.yml b/quests/move/game.yml index f694ae6..413bc35 100644 --- a/quests/move/game.yml +++ b/quests/move/game.yml @@ -9,14 +9,6 @@ requirements: - create stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始 condition: diff --git a/quests/path/game.yml b/quests/path/game.yml index 0aedf6c..dca6f75 100644 --- a/quests/path/game.yml +++ b/quests/path/game.yml @@ -11,14 +11,6 @@ requirements: - explore stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始教程 condition: diff --git a/quests/read/game.yml b/quests/read/game.yml index ad317bc..6407d17 100644 --- a/quests/read/game.yml +++ b/quests/read/game.yml @@ -9,14 +9,6 @@ requirements: - path stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始教程 condition: diff --git a/quests/remove/game.yml b/quests/remove/game.yml index 4560ba3..d6532fc 100644 --- a/quests/remove/game.yml +++ b/quests/remove/game.yml @@ -13,14 +13,6 @@ requirements: - move stages: - - id: warning-01 - repeatable: true - condition: - command: - - ' ' - hints: - - '!! 請勿使用全形空格 !!' - - id: start task: 輸入 `echo start` 來開始 condition: