def devops

near-v-framework@0.4.0.0 · domain/architecture/system/deployment/azure/effects.bend:95

import near-v-framework@0.4.0.0/domain/architecture/system/deployment/azure/effects.bend as Effects
import Base
import bend-net-json@0.3.0.0/json.bend as Json
import bend-kit-files@0.1.0.0/files.bend as Fs
import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as X

95# Who az-devops is signed in as, or "" when it has no profile.
96def devops() -> IO(String):
97  do IO<String>:
98    h : String <- X.home()
99    text : String <- X.read(Fs.path.join(h, ".config/azure-plugin/profiles.json"))
100    return string(at(at(value(Json.parse(text)), "devops"), "username"))

Uses (11)

Used by (1)