Skip to content

Commit

Permalink
Merge pull request #572 from acornett21/remove_pyxis_host_from_viper
Browse files Browse the repository at this point in the history
removing pyxis host and api key from viper in init
  • Loading branch information
bcrochet authored Apr 20, 2022
2 parents 0c0918d + ee39a22 commit 539f2d2
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 539f2d2

Please sign in to comment.