From d5156fe6faf17f8947b86315dfab0fefac831c0d Mon Sep 17 00:00:00 2001 From: Jay Patel <36803168+jay-babu@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:20:24 -0400 Subject: [PATCH] bugfix: check if bash-debug-adapter is available then get its data --- lua/mason-nvim-dap/mappings/configurations.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/mason-nvim-dap/mappings/configurations.lua b/lua/mason-nvim-dap/mappings/configurations.lua index 30616f9..09f5157 100644 --- a/lua/mason-nvim-dap/mappings/configurations.lua +++ b/lua/mason-nvim-dap/mappings/configurations.lua @@ -27,8 +27,15 @@ M.delve = { }, } -local BASHDB_DIR = require('mason-registry').get_package('bash-debug-adapter'):get_install_path() - .. '/extension/bashdb_dir' +local BASHDB_DIR = '' +if + require('mason-registry').has_package('bash-debug-adapter') + and require('mason-registry').get_package('bash-debug-adapter'):is_installed() +then + BASHDB_DIR = require('mason-registry').get_package('bash-debug-adapter'):get_install_path() + .. '/extension/bashdb_dir' +end + M.bash = { { type = 'bash',