Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV in jfrog-cli-core/artifactory/commands/generic/upload.go #55

Open
jhinrichsen opened this issue Jan 4, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jhinrichsen
Copy link

Problem
Panic when trying to upload a buffer to artifactory (equivalent to jfrog rt upload).

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x9006f9]

goroutine 1 [running]:
github.com/jfrog/jfrog-cli-core/artifactory/commands/generic.(*UploadCommand).upload(0xc00010fda8, 0xc0003da560, 0x40)
        ~/go/pkg/mod/github.com/jfrog/[email protected]/artifactory/commands/generic/upload.go:73 +0x79
github.com/jfrog/jfrog-cli-core/artifactory/commands/generic.(*UploadCommand).Run(...)
        ~/go/pkg/mod/github.com/jfrog/[email protected]/artifactory/commands/generic/upload.go:54

Reproduce

Run this code:

        cmd := generic.NewUploadCommand()
        if err := cmd.Run(); err != nil {
                log.Fatal(err)
        }

Expected behavior
The compiler should refuse to build incomplete upload commands. Second best, users of the library should not have to guess what 'GoBeans' / 'POGO' must be used:

func (uc *UploadCommand) SetBuildConfiguration(buildConfiguration *utils.BuildConfiguration) *UploadCommand {
	uc.buildConfiguration = buildConfiguration
	return uc
}

func (uc *UploadCommand) UploadConfiguration() *utils.UploadConfiguration {
	return uc.uploadConfiguration
}

Additional context
Maybe i am missing documentation or examples somewhere?

@jhinrichsen jhinrichsen added the bug Something isn't working label Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant