From 5e55206e6e78ab67e2f6de5f5087725f3f987af9 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 28 Nov 2021 12:45:50 +0100 Subject: Check if path values are set on remote --- lua/rclone.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lua') diff --git a/lua/rclone.lua b/lua/rclone.lua index 4403fee..84915a8 100644 --- a/lua/rclone.lua +++ b/lua/rclone.lua @@ -104,6 +104,12 @@ local function get_remote_config(remote) -- TODO: check how to do error handling in lua/vim plugins end + if target_config.vim_rclone_local_path == nil or target_config.vim_rclone_local_path == '' or + target_config.vim_rclone_remote_path == nil or target_config.vim_rclone_remote_path == '' then + print("Couldn't find suitable remote") + os.exit() + end + return target_remote, target_config end -- cgit v1.2.3