diff --git a/src/utils/utils.py b/src/utils/utils.py index 630dc9d..fd96acb 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -8,9 +8,15 @@ class BitwardenCommandException(Exception): def get_secret_from_bitwarden(logger, id): + sync_bw(logger) return command_wrapper(logger, command=f"get item {id}") +def sync_bw(logger): + status_output = command_wrapper(logger, command=f"sync") + logger.info(f"Sync successful {status_output}") + + def unlock_bw(logger): status_output = command_wrapper(logger, "status", False) status = status_output['data']['template']['status']