Floobits / flootty

A collaborative terminal.
Apache License 2.0
175 stars 25 forks source link

Error when sharing terminal on a Docker container #38

Open amiiit opened 8 years ago

amiiit commented 8 years ago

Hi,

I'm trying to share a terminal on a Docker container (hence the root), but no luck:

root@d2eecad4f364:/app# cat ~/.floorc.json
{
  "auth": {
    "floobits.com": {
      "username": "amitit",
      "api_key": "MY_API_KEY",
      "secret": "MY_SECRET"
    }
  }
}
root@d2eecad4f364:/app# flootty --url=https://floobits.com/amitit/myworkspace --unsafe
Terminal is unsafe. Other users will be able to send [enter]. Be wary!
Connecting to https://floobits.com/amitit/myworkspace
Connected!
There is no active terminal in this workspace. Do you want to share your terminal? (y/n)
y
Traceback (most recent call last):
  File "/usr/local/bin/flootty", line 9, in <module>
    load_entry_point('Flootty==3.1.7', 'console_scripts', 'flootty')()
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 357, in main
    f.select()
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 480, in select
    handler(fd)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 496, in cloud_read
    self.handle(buf)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 533, in handle
    self.handle_event(data)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 543, in handle_event
    func(data)
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 622, in on_create_term
    self.create_term()
  File "/usr/local/lib/python2.7/dist-packages/flootty/flootty.py", line 791, in create_term
    shell = os.environ['SHELL']
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'SHELL'
ciao.
root@d2eecad4f364:/app#

It seems like the credentials and workspace namings are in place. If I change them to something invalid, flootty warns properly about it.

Thanks

kans commented 8 years ago

this should be fixed as of 41be4d6060f8824ea4bfdbbc70eb07bacf7f13e3. Please let us know.