diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2024-12-06 03:19:39 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-06 03:19:39 -0800 |
| commit | 64073cbed0ce23e988160bfd1a148a75b6af94cc (patch) | |
| tree | e0fe72bb119de8903bd716f6bc510c2e1d4c11f7 /scripts | |
| parent | fix(typst_lsp): deprecate typst_lsp to tinymist (#3493) (diff) | |
| download | nvim-lspconfig-64073cbed0ce23e988160bfd1a148a75b6af94cc.tar nvim-lspconfig-64073cbed0ce23e988160bfd1a148a75b6af94cc.tar.gz nvim-lspconfig-64073cbed0ce23e988160bfd1a148a75b6af94cc.tar.bz2 nvim-lspconfig-64073cbed0ce23e988160bfd1a148a75b6af94cc.tar.lz nvim-lspconfig-64073cbed0ce23e988160bfd1a148a75b6af94cc.tar.xz nvim-lspconfig-64073cbed0ce23e988160bfd1a148a75b6af94cc.tar.zst nvim-lspconfig-64073cbed0ce23e988160bfd1a148a75b6af94cc.zip | |
Revert "refactor: use simpler file existence check" #3495
This reverts commit 90c1c6cc822b1836209514c096069b9bbeab63d9.
Fix #3485
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/docgen.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/docgen.lua b/scripts/docgen.lua index faecbcda..02c04dc8 100644 --- a/scripts/docgen.lua +++ b/scripts/docgen.lua @@ -62,7 +62,7 @@ local function make_section(indentlvl, sep, parts) end local function readfile(path) - assert(vim.fn.getftype(path) == 'file') + assert((vim.loop.fs_stat(path) or {}).type == 'file') return io.open(path):read '*a' end @@ -180,10 +180,10 @@ local function make_lsp_sections() function() local package_json_name = util.path.join(tempdir, config_name .. '.package.json') if docs.package_json then - if vim.fn.getftype(package_json_name) ~= 'file' then + if not ((vim.loop.fs_stat(package_json_name) or {}).type == 'file') then os.execute(string.format('curl -v -L -o %q %q', package_json_name, docs.package_json)) end - if vim.fn.getftype(package_json_name) ~= 'file' then + if not ((vim.loop.fs_stat(package_json_name) or {}).type == 'file') then print(string.format('Failed to download package.json for %q at %q', config_name, docs.package_json)) os.exit(1) return |
