mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Added small validation to GUNs, changed logrus loglevel
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user