Skip to content

Commit

Permalink
Maybe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IogaMaster committed Oct 13, 2023
1 parent 253dc8f commit 4966a3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/neocord/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ function neocord:get_project_name(file_path)
-- TODO: Only checks for a git repository, could add more checks here
-- Might want to run this in a background process depending on performance
local project_path_cmd = "git rev-parse --show-toplevel"
project_path_cmd = file_path and string.format([[cd "%s" && %s]], file_path, project_path_cmd) or project_path_cmd
project_path_cmd = file_path and string.format([[bash -c 'cd "%s" && %s']], file_path, project_path_cmd)
or project_path_cmd

local project_path = vim.fn.system(project_path_cmd)
project_path = vim.trim(project_path)
Expand Down

0 comments on commit 4966a3d

Please sign in to comment.