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

eval $(dinghy shellinit) produces unhelpful output when dinghy VM doesn't exist. #155

Closed
mrmachine opened this issue Mar 6, 2016 · 1 comment

Comments

@mrmachine
Copy link

I destroyed my dinghy VM and then happened to open a new terminal window before re-creating it. In my .zshrc I have eval $(dinghy shellinit) which produces the following output:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `new'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse'
    from /usr/local/Cellar/dinghy/4.3.1/cli/dinghy/machine.rb:78:in `inspect'
    from /usr/local/Cellar/dinghy/4.3.1/cli/dinghy/machine.rb:82:in `inspect_driver'
    from /usr/local/Cellar/dinghy/4.3.1/cli/dinghy/machine.rb:50:in `vm_ip'
    from /usr/local/Cellar/dinghy/4.3.1/cli/dinghy/check_env.rb:21:in `expected'
    from /usr/local/Cellar/dinghy/4.3.1/cli/dinghy/check_env.rb:29:in `print'
    from /usr/local/Cellar/dinghy/4.3.1/cli/cli.rb:163:in `shellinit'
    from /usr/local/Cellar/dinghy/4.3.1/cli/thor/lib/thor/command.rb:27:in `run'
    from /usr/local/Cellar/dinghy/4.3.1/cli/thor/lib/thor/invocation.rb:126:in `invoke_command'
    from /usr/local/Cellar/dinghy/4.3.1/cli/thor/lib/thor.rb:359:in `dispatch'
    from /usr/local/Cellar/dinghy/4.3.1/cli/thor/lib/thor/base.rb:440:in `start'
    from /usr/local/bin/_dinghy_command:10:in `<main>'

This made me think my Dinghy installation was broken and searching around for an explanation. If there's no dinghy VM, shellinit shouldn't do anything, or should print a message about the VM not being found?

@codekitchen
Copy link
Owner

good catch, thanks

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