Skip to content

Missing config attribute on <alias>.toml file causing application to fail #156

@davrodpin

Description

@davrodpin

Affected Version

Master @ b6c4dc0

Expected Behavior

Application to use the default value $HOME/.ssh/config

Current Behavior

Application crashes with the following error stack:

panic: read .: is a directory

goroutine 20 [running]:
github.com/kevinburke/ssh_config.(*sshLexer).peek(0xc0000d6370, 0x0)
	/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:202 +0xf7
github.com/kevinburke/ssh_config.(*sshLexer).lexVoid(0xc0000d6370, 0x0)
	/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:141 +0x45
github.com/kevinburke/ssh_config.(*sshLexer).run(0xc0000d6370)
	/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:224 +0x4a
created by github.com/kevinburke/ssh_config.lexSSH
	/go/pkg/mod/github.com/kevinburke/ssh_config@v0.0.0-20190630040420-2e50c441276c/lexer.go:239 +0xd7

Steps to Reproduce

  1. Create the following alias
mole add alias remote test --verbose --insecure --source 192.168.33.11:9090 --destination 127.0.0.1:8080 --server mole@127.0.0.01:22122 --key test-env/ssh-server/keys/key --keep-alive-interval 2s
  1. Start mole with alias
$ ./bin/mole start alias test

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions