better logging; run_once check for pull state

This commit is contained in:
garrettmills
2020-08-13 20:47:34 -05:00
parent f5b84b530c
commit ba8119903e
3 changed files with 12 additions and 5 deletions

View File

@@ -13,10 +13,13 @@ class PermissionState extends State {
}
async check() {
const path = await this._path()
const permissions = `${await path.permissions()}`.trim()
const target = `${this._config.level}`.trim()
return permissions === target
try {
const path = await this._path()
const permissions = `${await path.permissions()}`.trim()
const target = `${this._config.level}`.trim()
return permissions === target
} catch (e) {}
return false
}
async reverse() {