mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: add global exceptions
This commit is contained in:
1 parent
fb823814e0
commit
cfce5ececa
6 files changed
+71
-5
No files matched your search
@@ -40,4 +40,14 @@ export class Condition {
|
||||
if (this.matchers.length === 0) return true
|
||||
return checkFiles(checker, this.files)
|
||||
}
|
||||
|
||||
async satisfies(
|
||||
command: ICommand,
|
||||
checker: IFileExistenceChecker
|
||||
): Promise<boolean> {
|
||||
// Error matcher is always true
|
||||
if (this.matchers.length === 1 && this.files.length === 0) return false
|
||||
// eslint-disable-next-line no-return-await
|
||||
return this.match(command) && (await this.check(checker))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user