mirror of
https://github.com/ko-build/ko.git
synced 2025-07-12 23:50:31 +02:00
use automaxprocs to calculate the number of CPUs (#649)
this is useful for container environments
This commit is contained in:
@ -20,6 +20,7 @@ import (
|
||||
cranecmd "github.com/google/go-containerregistry/cmd/crane/cmd"
|
||||
"github.com/google/go-containerregistry/pkg/logs"
|
||||
"github.com/spf13/cobra"
|
||||
"go.uber.org/automaxprocs/maxprocs"
|
||||
)
|
||||
|
||||
var Root = New()
|
||||
@ -37,6 +38,8 @@ func New() *cobra.Command {
|
||||
logs.Debug.SetOutput(os.Stderr)
|
||||
}
|
||||
logs.Progress.SetOutput(os.Stderr)
|
||||
|
||||
maxprocs.Set(maxprocs.Logger(logs.Debug.Printf))
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
cmd.Help()
|
||||
|
Reference in New Issue
Block a user