mirror of https://github.com/docker/docs.git
Added small validation to GUNs, changed logrus loglevel
This commit is contained in:
parent
e5dd1721b3
commit
b0df67acd3
|
@ -162,8 +162,11 @@ func keysGenerate(cmd *cobra.Command, args []string) {
|
|||
fatalf("must specify a GUN")
|
||||
}
|
||||
|
||||
// (diogo): Validate GUNs
|
||||
//TODO (diogo): Validate GUNs. Don't allow '/' or '\' for now.
|
||||
gun := args[0]
|
||||
if gun[0:1] == "/" || gun[0:1] == "\\" {
|
||||
fatalf("invalid Global Unique Name: %s", gun)
|
||||
}
|
||||
|
||||
_, cert, err := generateKeyAndCert(gun)
|
||||
if err != nil {
|
||||
|
|
|
@ -26,7 +26,7 @@ const tufDir string = configPath + "tuf/"
|
|||
var caStore trustmanager.X509Store
|
||||
|
||||
func init() {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
logrus.SetLevel(logrus.ErrorLevel)
|
||||
// Retrieve current user to get home directory
|
||||
usr, err := user.Current()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue