bank-vaults / secret-sync

Synchronise secrets between secret stores in a configurable manner
Apache License 2.0
18 stars 1 forks source link

Rewrite sync command to work with only the context created on command execution #202

Closed csatib02 closed 3 months ago

csatib02 commented 3 months ago

Preflight Checklist

Version

v0.1.3

Expected Behavior

command.ExecuteContext(context.Background()) should create the context, and it should be retrievable with command.Context().

Actual Behavior

Currently the NewSyncCMD function runs init() and run() and after that the sync command is executed, therefore we cannot use command.ExecuteContext(context.Background()) to create a context, and then use it elsewhere with command.Context().

Steps To Reproduce

No response

Logs

No response

Additional Information

No response

csatib02 commented 3 months ago

Tracking: https://github.com/bank-vaults/secret-sync/pull/205#discussion_r1651244921