wbond / sublime_terminal

Launch terminals from the current file or the root project folder
https://packagecontrol.io/packages/Terminal
MIT License
600 stars 117 forks source link

Added fallback for env setting #155

Closed twolfson closed 7 years ago

twolfson commented 7 years ago

We missed adding a fallback for env in #152. This caused an error reported in #154. In this PR;

twolfson commented 7 years ago

Cowboy landing this as it's minor and a bug in production. If we get another bug report on this code, then it might be a good idea to revert the feature =/

kenberkeley commented 7 years ago

I replaced env_setting = get_setting('env') with env_setting = get_setting('env', {}) as you did, but the error still exists:

error: Terminal: environment can only contain strings
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 205, in on_activated
    callback.__module__, "on_activated", EVENT_TIMEOUT)
  File ".\sublime_plugin.py", line 154, in run_timed_function
    ret = f()
  File ".\sublime_plugin.py", line 204, in <lambda>
    run_timed_function(lambda: callback.on_activated(v),
  File ".\git_gutter_events.py", line 58, in on_activated
  File ".\git_gutter_events.py", line 89, in debounce
Boost.Python.ArgumentError: Python argument types in
    sublime.set_timeout(function, NoneType)
did not match C++ signature:
    set_timeout(class boost::python::api::object, int)
kenberkeley commented 7 years ago

Platform: Windows7 Ultimate Sublime Version: 2.0.2, Build 2221