From 67f6f13c2eac885bf379fc0f4abea928c735629c Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sat, 1 Apr 2023 21:28:38 +0200 Subject: [PATCH] neovim.tests.nvim_with_opt_plugin: fixed once :Dashboard succeeded, the script would close neovim and thus never terminate. We instead check if the command ":Dashboard" exists. --- pkgs/applications/editors/neovim/tests/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/neovim/tests/default.nix b/pkgs/applications/editors/neovim/tests/default.nix index 707a310b632a..ad11a46b4e64 100644 --- a/pkgs/applications/editors/neovim/tests/default.nix +++ b/pkgs/applications/editors/neovim/tests/default.nix @@ -169,7 +169,7 @@ rec { nvim_with_gitsigns_plugin = neovim.override { extraName = "-with-gitsigns-plugin"; - configure.packages.plugins = { + configure.packages.plugins = { start = [ vimPlugins.gitsigns-nvim ]; @@ -260,13 +260,12 @@ rec { packadd dashboard-nvim-unique-for-tests-please-dont-use-opt " Try to run Dashboard again, and throw if it fails - try - Dashboard - echo "Dashboard found" - catch /^Vim\%((\a\+)\)\=:E492/ + let res = exists(':Dashboard') + if res == 0 echo "Dashboard not found, throwing error" cquit 1 - endtry + endif + cquit 0 ''; };