Fix version detection for macos 11.
@@ -24,9 +24,11 @@ elif sublime.platform() == 'osx':
try:
p = subprocess.Popen(['/usr/bin/sw_vers', '-productVersion'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = p.communicate()
- v = float(result[0].decode('utf-8').split('.')[1])
- print('Floobits detected OS X 10.%.0f' % v)
- if v < 7:
+ versions = result[0].decode('utf-8').split('.')
+ major = float(versions[0])
+ minor = float(versions[1])
+ print('Floobits detected macos %.0f.%.0f' % (major, minor))
+ if major < 11 and minor < 7:
sublime.error_message('''Sorry, but the Floobits plugin doesn\'t work on 10.6 or earlier.
Please upgrade your operating system if you want to use this plugin. :(''')
except Exception as e:
