Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cliv2/cmd/cliv2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,6 @@ func MainWithErrorCode() int {
)
network_utils.AddSnykRequestId(networkAccess)

if debugEnabled {
writeLogHeader(globalConfiguration, networkAccess)
}

// initialize the extensions -> they register themselves at the engine
initExtensions(globalEngine, globalConfiguration)

Expand All @@ -619,6 +615,10 @@ func MainWithErrorCode() int {
globalLogger.Print("Failed to init Workflow Engine!", err)
return constants.SNYK_EXIT_CODE_ERROR
}
if debugEnabled {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

context: writeLogHeader will call config.GetString(configuration.ORGANIZATION) before analytics are initialised, so we move it to just after globalEngine.Init()

writeLogHeader(globalConfiguration, networkAccess)
}
globalEngine.GetAnalytics().SetOrg(globalConfiguration.GetString(configuration.ORGANIZATION))

// add output flags as persistent flags
outputWorkflow, _ := globalEngine.GetWorkflow(localworkflows.WORKFLOWID_OUTPUT_WORKFLOW)
Expand Down
2 changes: 1 addition & 1 deletion cliv2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/snyk/code-client-go v1.27.0
github.com/snyk/container-cli v0.0.0-20260213211631-cd2b2cf8f3ea
github.com/snyk/error-catalog-golang-public v0.0.0-20260505112649-a5103d411663
github.com/snyk/go-application-framework v0.0.0-20260511100036-100e7116aec5
github.com/snyk/go-application-framework v0.0.0-20260519092052-d0060e044f22
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65
github.com/snyk/snyk-iac-capture v0.6.5
github.com/snyk/snyk-ls v0.0.0-20260414093345-2a6d7434eb91
Expand Down
4 changes: 2 additions & 2 deletions cliv2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,8 @@ github.com/snyk/dep-graph/go v0.0.0-20260127160647-c836da762c62 h1:kgZNQ5ztI4+n3
github.com/snyk/dep-graph/go v0.0.0-20260127160647-c836da762c62/go.mod h1:hTr91da/4ze2nk9q6ZW1BmfM2Z8rLUZSEZ3kK+6WGpc=
github.com/snyk/error-catalog-golang-public v0.0.0-20260505112649-a5103d411663 h1:j2ZPhi78wKIHTiL9EFTNVXMIbsk56FVF2d5Sy1ZwSYk=
github.com/snyk/error-catalog-golang-public v0.0.0-20260505112649-a5103d411663/go.mod h1:Ytttq7Pw4vOCu9NtRQaOeDU2dhBYUyNBe6kX4+nIIQ4=
github.com/snyk/go-application-framework v0.0.0-20260511100036-100e7116aec5 h1:IxTmr+zaWVkjShWQLLy5rx69S+Em4X32MH+Chj1WdFk=
github.com/snyk/go-application-framework v0.0.0-20260511100036-100e7116aec5/go.mod h1:yTGCJKf6RmqdwrNs5B9zmukL9x1D8EhfSK8mzaPB1Rk=
github.com/snyk/go-application-framework v0.0.0-20260519092052-d0060e044f22 h1:N773Pk8Qphpuxhp8LKWiZhmlLV9HkJ1o7ZTwSGMgDaY=
github.com/snyk/go-application-framework v0.0.0-20260519092052-d0060e044f22/go.mod h1:yTGCJKf6RmqdwrNs5B9zmukL9x1D8EhfSK8mzaPB1Rk=
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65 h1:CEQuYv0Go6MEyRCD3YjLYM2u3Oxkx8GpCpFBd4rUTUk=
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65/go.mod h1:88KbbvGYlmLgee4OcQ19yr0bNpXpOr2kciOthaSzCAg=
github.com/snyk/policy-engine v1.1.3 h1:MU+K8pxbN6VZ9P5wALUt8BwTjrPDpoEtmTtQqj7sKfY=
Expand Down
Loading