fix(startup): init.lua: set $MYVIMRC to absolute path #15748

- main.c: remove os_setenv("MYVIMRC",…), it is already done by
  do_source().
  - This also sets $MYVIMRC to a full (absolute) path.
- code cleanup.
This commit is contained in:
Justin M. Keyes
2021-09-21 08:47:46 -07:00
committed by GitHub
parent c208993026
commit c76cddf3e0
4 changed files with 15 additions and 13 deletions

View File

@@ -472,7 +472,7 @@ describe('user config init', function()
clear{ args_rm={'-u' }, env=xenv }
eq(1, eval('g:lua_rc'))
eq(init_lua_path, eval('$MYVIMRC'))
eq(funcs.fnamemodify(init_lua_path, ':p'), eval('$MYVIMRC'))
end)
describe 'with explicitly provided config'(function()