mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
feat: add output matcher
This commit is contained in:
1 parent
9eb08b45f4
commit
cb26e1dcb0
2 files changed
+14
No files matched your search
@@ -40,6 +40,12 @@ export class PwdMatcher implements Matcher {
|
||||
}
|
||||
}
|
||||
|
||||
export class OutputMatcher extends PatternMatcher implements Matcher {
|
||||
match(command: Partial<Command>): boolean {
|
||||
return command.output ? this.test(command.output.trim()) : false
|
||||
}
|
||||
}
|
||||
|
||||
export interface ICondition {
|
||||
command?: string
|
||||
output?: string
|
||||
|
||||
Reference in new issue
Block a user