diff --git a/commands.py b/commands.py index 510f2fd..711e5f0 100644 --- a/commands.py +++ b/commands.py @@ -13,11 +13,24 @@ class CondaCommand(sublime_plugin.WindowCommand): @property def settings(self): - """Load the plugin settings for commands to use.""" + """Load the plugin settings for commands to use. + + For Unix systems, the plugin will first try to load the old settings + file with the base name 'conda.sublime-settings'. If this file can't + be accessed the plugin will set the settings file to + the new settings file named 'Conda.sublime-settings'. + """ if sys.platform.startswith('win'): return sublime.load_settings('Conda (Windows).sublime-settings') else: - return sublime.load_settings('Conda.sublime-settings') + try: + settings = sublime.load_settings('conda.sublime-settings') + # sublime text doesn't tell us if the settings file exists unless we try to access it + os.path.expanduser(settings.get('environment_directory')) + except AttributeError: + settings = sublime.load_settings('Conda.sublime-settings') + + return settings @property def executable(self): diff --git a/messages.json b/messages.json index 8deae4e..f130834 100644 --- a/messages.json +++ b/messages.json @@ -13,5 +13,6 @@ "0.4.3": "messages/v0.4.3.txt", "0.4.4": "messages/v0.4.4.txt", "0.4.5": "messages/v0.4.5.txt", - "0.4.6": "messages/v0.4.6.txt" + "0.4.6": "messages/v0.4.6.txt", + "0.5.0": "messages/v0.5.0.txt" } diff --git a/messages/v0.5.0.txt b/messages/v0.5.0.txt new file mode 100644 index 0000000..92e6f11 --- /dev/null +++ b/messages/v0.5.0.txt @@ -0,0 +1,5 @@ +Conda v0.5.0 +============ + +- Added the ability to load old settings files on Unix based systems +- Incremented minor version as the new settings file system could cause minor breakage