Swlive.write_live_creds2: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/swlive.bend as Swlive Lines 177-184 of cswap-bend-cli@0.1.0.0/swlive.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&start_line=177&end_line=184 import Base import cswap-bend-cli@0.1.0.0/fs.bend as Fs import cswap-bend-cli@0.1.0.0/act.bend as Act import cswap-bend-cli@0.1.0.0/fs/write.bend as FsW import cswap-bend-cli@0.1.0.0/store/base.bend as SBase import cswap-bend-cli@0.1.0.0/store/io.bend as SIo def write_live_creds2(+api_key: Bool, +ctx: SBase.Ctx, +creds: String) -> Act.of(Unit): match api_key: case True{}: FsW.remove(SBase.live_creds_path(ctx)) case False{}: do ActM: FsW.mkdir_p(Fs.dirname(SBase.live_creds_path(ctx))) SIo.write_secret(SBase.live_creds_path(ctx), creds) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs/write.bend&name=mkdir_p https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs/write.bend&name=remove https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&name=dirname https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=Ctx https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=live_creds_path https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/io.bend&name=write_secret https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=ActM https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=ActM.bind