Skip to content

Commit

Permalink
removing pyxis host and api key from viper in init since they are gat…
Browse files Browse the repository at this point in the history
…hered in different way now

Signed-off-by: Adam D. Cornett <[email protected]>
  • Loading branch information
acornett21 committed Apr 20, 2022
1 parent 0c0918d commit ee39a22
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/check_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ var checkContainerCmd = &cobra.Command{

// establish a pyxis client.
apiToken := viper.GetString("pyxis_api_token")
pyxisClient := pyxis.NewPyxisClient(viper.GetString("pyxis_host"), apiToken, projectId, &http.Client{Timeout: 60 * time.Second})
pyxisClient := pyxis.NewPyxisClient(pyxisHost, apiToken, projectId, &http.Client{Timeout: 60 * time.Second})

// get the project info from pyxis
certProject, err := pyxisClient.GetProject(ctx)
Expand Down
4 changes: 0 additions & 4 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ func initConfig() {

// Set up scorecard wait time default
viper.SetDefault("scorecard_wait_time", DefaultScorecardWaitTime)

// Set up pyxis host
viper.SetDefault("pyxis_host", certification.DefaultPyxisHost)
viper.SetDefault("pyxis_api_token", "")
}

// preRunConfig is used by cobra.PreRun in all non-root commands to load all necessary configurations
Expand Down

0 comments on commit ee39a22

Please sign in to comment.