From 8929739543e5a4dc51d1af1d122bdbbb54e634b9 Mon Sep 17 00:00:00 2001 From: redFrik Date: Wed, 10 Jan 2024 21:55:29 +0100 Subject: [PATCH] macos bugfix: allow .app in subfolder All paths in the locations array were not considered because the if test always returned true (i.e. the SuperCollider.app had to sit in /Applications). The test should be ~= 0 and thn SuperCollider.app can live inside the subfolder /Applications/SuperCollider. ref: https://github.com/davidgranstrom/scnvim/issues/200 --- lua/scnvim/sclang.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/scnvim/sclang.lua b/lua/scnvim/sclang.lua index da08f123..e17d4a1d 100644 --- a/lua/scnvim/sclang.lua +++ b/lua/scnvim/sclang.lua @@ -86,7 +86,7 @@ function M.find_sclang_executable() local locations = { '/Applications', '/Applications/SuperCollider' } for _, loc in ipairs(locations) do local app_path = string.format('%s/%s', loc, app) - if vim.fn.executable(app_path) then + if vim.fn.executable(app_path) ~= 0 then return app_path end end