summaryrefslogtreecommitdiff
path: root/lua/rclone.lua
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2021-11-28 12:45:50 +0100
committerDaniel Weipert <code@drogueronin.de>2022-01-10 13:28:28 +0100
commit5e55206e6e78ab67e2f6de5f5087725f3f987af9 (patch)
tree7f1cd9d9ddc0cbafd2639454d1ed4cd494ae2e2f /lua/rclone.lua
parent764649497637e50b4c8a7ed7927ddb03bb575793 (diff)
Check if path values are set on remote
Diffstat (limited to 'lua/rclone.lua')
-rw-r--r--lua/rclone.lua6
1 files changed, 6 insertions, 0 deletions
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