Merge pull request #867 from Guldoman/fix_load_project_module

Load project module on startup
This commit is contained in:
Jefferson González 2022-03-06 21:02:22 -04:00 committed by GitHub
commit 1be425d1de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -723,10 +723,11 @@ function core.init()
local got_user_error, got_project_error = not core.load_user_directory() local got_user_error, got_project_error = not core.load_user_directory()
local project_dir_abs = system.absolute_path(project_dir) local project_dir_abs = system.absolute_path(project_dir)
-- We prevent set_project_dir below to effectively add and scan the directory becaese tha -- We prevent set_project_dir below to effectively add and scan the directory because the
-- project module and its ignore files is not yet loaded. -- project module and its ignore files is not yet loaded.
local set_project_ok = project_dir_abs and core.set_project_dir(project_dir_abs) local set_project_ok = project_dir_abs and core.set_project_dir(project_dir_abs)
if set_project_ok then if set_project_ok then
got_project_error = not core.load_project_module()
if project_dir_explicit then if project_dir_explicit then
update_recents_project("add", project_dir_abs) update_recents_project("add", project_dir_abs)
end end