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

"invalid argument" when the chosen snippet includes <param> on WSL #44

Open
taketori opened this issue May 5, 2017 · 1 comment
Open

Comments

@taketori
Copy link

taketori commented May 5, 2017

On Microsoft Windows [Version 10.0.15063]'s WSL

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial
$ pet version
pet version 0.2.2 (was extracted from downloaded .zip file)
$ cat .config/pet/config.toml
[General]
  snippetfile = "/home/taketori/.config/pet/snippet.toml"
  editor = "micro"
  column = 40
  selectcmd = "fzf"

[Gist]
  file_name = "pet-snippet.toml"
  access_token = ""
  gist_id = ""
  public = false
$ pet list
Description: test1
    Command: echo <param=aaa>
------------------------------
Description: test2
    Command: echo <param>
------------------------------
Description: test3
    Command: echo aaa
------------------------------

both test1 and test2 show error like below:
(test3 does not.)

$ pet exec
2017/05/05 23:59:49 invalid argument
panic: invalid argument


goroutine 1 [running]:
log.Panicln(0xc42003d830, 0x1, 0x1)
        /usr/local/Cellar/go/1.8/libexec/src/log/log.go:336 +0xc0
github.com/knqyf263/pet/dialog.GenerateParamsLayout(0xc42001c150, 0xc420095af0, 0xc)
        /Users/teppei/src/github.com/knqyf263/pet/dialog/view.go:36 +0xac
github.com/knqyf263/pet/cmd.filter(0x0, 0x0, 0x0, 0xc420092f90, 0x26, 0x0, 0x0, 0x0)
        /Users/teppei/src/github.com/knqyf263/pet/cmd/util.go:76 +0xcc2
github.com/knqyf263/pet/cmd.execute(0xabc620, 0xadd008, 0x0, 0x0, 0x0, 0x0)
        /Users/teppei/src/github.com/knqyf263/pet/cmd/exec.go:28 +0x7c
github.com/knqyf263/pet/vendor/github.com/spf13/cobra.(*Command).execute(0xabc620, 0xadd008, 0x0, 0x0, 0xabc620, 0xadd008)
        /Users/teppei/src/github.com/knqyf263/pet/vendor/github.com/spf13/cobra/command.go:644 +0x3f2
github.com/knqyf263/pet/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xabcc80, 0xc42006c058, 0x0, 0xac0468)
        /Users/teppei/src/github.com/knqyf263/pet/vendor/github.com/spf13/cobra/command.go:734 +0x339
github.com/knqyf263/pet/vendor/github.com/spf13/cobra.(*Command).Execute(0xabcc80, 0x1, 0x0)
        /Users/teppei/src/github.com/knqyf263/pet/vendor/github.com/spf13/cobra/command.go:693 +0x2b
github.com/knqyf263/pet/cmd.Execute()
        /Users/teppei/src/github.com/knqyf263/pet/cmd/root.go:47 +0x31
main.main()
        /Users/teppei/src/github.com/knqyf263/pet/main.go:20 +0x20

@krsfrodaslz
Copy link

krsfrodaslz commented Dec 17, 2018

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

No branches or pull requests

2 participants