feat: add exceptions to stage

This commit is contained in:
Lin, Hung-Shin committed 2023-11-21 14:27:43 +08:00
1 parent 56d96cf7a0
commit 66ce015f0e
6 files changed
+86 -1

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
FROM linuxodyssey/quest-base
COPY home ${HOME}
+22 -1
View File
@@ -1,6 +1,27 @@
title: 複製檔案
instruction: |
複製檔案
在這個關卡中,你將學習如何複製檔案。
requirements:
- create
stages:
- id: start
task: 輸入 `echo start` 來開始
condition:
output:
- start
exceptions:
- condition:
command:
- ^echo$
responses:
- type: narrative
content:
- 你忘記輸入 `start` 了嗎?
- 請輸入 `echo start` 來開始
- catchAll: true
responses:
- type: narrative
content:
- 請輸入 `echo start` 來開始