Skip to content

Commit

Permalink
fix: update import description
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Sep 28, 2020
1 parent f50e582 commit aef1e1a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cmd/identities/import.go
Expand Up @@ -20,8 +20,16 @@ import (
// importCmd represents the import command
var importCmd = &cobra.Command{
Use: "import <file.json [file-2.json [file-3.json] ...]>",
Short: "import identities from files or STD_IN",
Long: "Import identities from files or STD_IN. Files are expected to each contain a single identity. The validity of files can be tested beforehand using `... identities validate`. Importing credentials is not yet supported.",
Short: "Import identities from files or STD_IN",
Long: `Import identities from files or STD_IN:
kratos identities import file.json
kratos identities import <(cat file.json)
Files are expected to each contain a single identity. The validity of files can be tested beforehand using "... identities validate".
WARNING: Importing credentials is not yet supported.`,
RunE: func(cmd *cobra.Command, args []string) error {
c := cliclient.NewClient(cmd)

Expand All @@ -43,7 +51,7 @@ var importCmd = &cobra.Command{
var params models.CreateIdentity
err = json.NewDecoder(bytes.NewBuffer(fc)).Decode(&params)
if err != nil {
fmt.Fprintln(cmd.ErrOrStderr(), "STD_IN: Could not parse identity")
_, _ = fmt.Fprintln(cmd.ErrOrStderr(), "STD_IN: Could not parse identity")
return clihelpers.FailSilently(cmd)
}

Expand Down

0 comments on commit aef1e1a

Please sign in to comment.