fix: prevent execute command twice

This commit is contained in:
wancat committed 2023-08-08 20:38:27 +08:00
1 parent 41a090ce73
commit a73aa8b461
2 files changed
+2 -6

No files matched your search

-4
View File
@@ -17,14 +17,10 @@ const commandHandler = async (session, commandInput) => {
return {}
}
console.log(stage.condition)
const commandMatch = checkMatch(stage.condition.command, commandInput.command)
const outputMatch = checkMatch(stage.condition.output, commandInput.output)
const errorMatch = checkMatch(stage.condition.error, commandInput.output)
console.log(commandMatch, outputMatch, errorMatch)
if (!commandMatch || !outputMatch || !errorMatch) return {}
session.completion.push(session.progress)