aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorGhjuvan Lacambre <code@lacamb.re>2023-05-28 16:04:54 +0200
committerGitHub <noreply@github.com>2023-05-28 16:04:54 +0200
commit5a3752889c5b7e18d1041eb873ca2fa9ceb814bd (patch)
tree07e0a62ee0abe2814d310565b5d71b3a613de85f /src/nvim/main.c
parentd561830a5242a00545a320acb80be083dd590d05 (diff)
downloadrneovim-5a3752889c5b7e18d1041eb873ca2fa9ceb814bd.tar.gz
rneovim-5a3752889c5b7e18d1041eb873ca2fa9ceb814bd.tar.bz2
rneovim-5a3752889c5b7e18d1041eb873ca2fa9ceb814bd.zip
fix(NVIM_APPNAME): show error message if $NVIM_APPNAME is invalid
Closes https://github.com/neovim/neovim/issues/23056.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index d4fbf8ce93..f27ebb2f67 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -250,6 +250,11 @@ int main(int argc, char **argv)
argv0 = argv[0];
+ if (!appname_is_valid()) {
+ os_errmsg("$NVIM_APPNAME is not a valid file name.\n");
+ exit(1);
+ }
+
if (argc > 1 && STRICMP(argv[1], "-ll") == 0) {
if (argc == 2) {
print_mainerr(err_arg_missing, argv[1]);