mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-16 05:16:08 +02:00
versioning: fix panic when using go.mod (#1938)
``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9830a6] goroutine 1 [running]: github.com/SAP/jenkins-library/pkg/versioning.searchDescriptor(0xc00067c060, 0x2, 0x2, 0x0, 0x0, 0xc0006549c0, 0xc0006413a0, 0x982ce0) /home/runner/work/jenkins-library/jenkins-library/pkg/versioning/versioning.go:156 +0x76 github.com/SAP/jenkins-library/pkg/versioning.(*GoMod).GetVersion(0xc0006549c0, 0x6, 0x18089f1, 0x6, 0xc000664a80) /home/runner/work/jenkins-library/jenkins-library/pkg/versioning/gomodfile.go:52 +0x18a ... ```
This commit is contained in:
parent
a2ce194301
commit
115025ce4b
@ -87,7 +87,7 @@ func GetArtifact(buildTool, buildDescriptorFilePath string, opts *Options, execR
|
||||
|
||||
switch buildDescriptorFilePath {
|
||||
case "go.mod":
|
||||
artifact = &GoMod{path: buildDescriptorFilePath}
|
||||
artifact = &GoMod{path: buildDescriptorFilePath, fileExists: fileExists}
|
||||
break
|
||||
default:
|
||||
artifact = &Versionfile{path: buildDescriptorFilePath}
|
||||
|
Loading…
Reference in New Issue
Block a user