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

Panic when used #65

Open
breznik opened this issue Jan 28, 2019 · 5 comments
Open

Panic when used #65

breznik opened this issue Jan 28, 2019 · 5 comments

Comments

@breznik
Copy link

breznik commented Jan 28, 2019

Hi, your tool looks useful, so I wanted to give it a try. I did:
go get github.com/wagoodman/bashful

And then I made a simple hello.yaml:

tasks:
  - cmd: echo "Hello, World!"

When i try to run it, I get a panic:

bashful run hello.yaml 
Running 
    • echo "Hello, World!"                                                                                                                                                                                                                                panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1092945]

goroutine 1 [running]:
os.(*File).Name(0x0, 0x22, 0x1446f0d)
	/usr/local/Cellar/go/1.10.1/libexec/src/os/file.go:49 +0x5
github.com/wagoodman/bashful/pkg/runtime/handler.(*TaskLogger).doRegister(0xc420115400, 0xc420099860)

and so on.

Am I doing something wrong?

@wagoodman
Copy link
Owner

wagoodman commented Feb 5, 2019

I see nothing that you're doing wrong, and I can't seem to reproduce this yet:

$ bashful  run hello.yaml 
Running 
    • echo "Hello, World!"                                                                                                                                                                                                                                                                                                     
      100.00% Complete  Tasks[1/1] 
$
  • If you try one of the precompiled binaries from the release page do you have any different results?
  • Are you running on mac or linux?
  • What version of go are you using?

@breznik
Copy link
Author

breznik commented Feb 9, 2019

  • Tried most recent precompiled binary - worked without any problem
  • Running on mac
  • go v1.10.1

@wagoodman
Copy link
Owner

try upgrading go to at least v1.11 (or higher), which is when go modules were introduced (and being used here to pin the version of dependencies)

@breznik
Copy link
Author

breznik commented Feb 10, 2019

Upgraded to go v1.11.5 on osx, did the go get again, and back to having a panic.

@qiangyt
Copy link

qiangyt commented Mar 20, 2022

Upgraded to go v1.11.5 on osx, did the go get again, and back to having a panic.

My fix: #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants