import (
"fmt"
+ "os"
"code.gitea.io/gitea/modules/generate"
+ "github.com/mattn/go-isatty"
"github.com/urfave/cli"
)
return err
}
- fmt.Printf("%s\n", internalToken)
+ fmt.Printf("%s", internalToken)
+
+ if isatty.IsTerminal(os.Stdout.Fd()) {
+ fmt.Printf("\n")
+ }
+
return nil
}
return err
}
- fmt.Printf("%s\n", JWTSecretBase64)
+ fmt.Printf("%s", JWTSecretBase64)
+
+ if isatty.IsTerminal(os.Stdout.Fd()) {
+ fmt.Printf("\n")
+ }
+
return nil
}
return err
}
- fmt.Printf("%s\n", secretKey)
+ fmt.Printf("%s", secretKey)
+
+ if isatty.IsTerminal(os.Stdout.Fd()) {
+ fmt.Printf("\n")
+ }
+
return nil
}