1
0
mirror of https://github.com/smallstep/cli.git synced 2025-08-09 03:22:43 +03:00

Merge pull request #612 from smallstep/herman/context-directory

Change authority and profile to default to context name when set
This commit is contained in:
Herman Slatman
2022-02-15 22:56:58 +01:00
committed by GitHub
2 changed files with 19 additions and 23 deletions

View File

@@ -479,11 +479,11 @@ func initAction(ctx *cli.Context) (err error) {
}
ctxAuthority := ctx.String("authority")
if ctxAuthority == "" {
ctxAuthority = dnsNames[0]
ctxAuthority = ctxName
}
ctxProfile := ctx.String("profile")
if ctxProfile == "" {
ctxProfile = dnsNames[0]
ctxProfile = ctxName
}
if err := step.Contexts().Add(&step.Context{
Name: ctxName,