bin/dbox in dbox-0.6.0 vs bin/dbox in dbox-0.6.1
- old
+ new
@@ -52,15 +52,21 @@
# the same name of the directory being created/cloned
local_path = args[1] || remote_path.split("/").last
res = Dbox.send(command, remote_path, local_path)
exit 1 if res[:failed].size > 0
-when "pull", "push", "sync"
+when "pull", "push"
# default to current directory
local_path = args[0] || "."
res = Dbox.send(command, local_path)
exit 1 if res[:failed].size > 0
+when "sync"
+ # default to current directory
+ local_path = args[0] || "."
+
+ res = Dbox.sync(local_path)
+ exit 1 if res[:pull][:failed].size > 0 || res[:push][:failed].size > 0
when "move"
remote_path = args[0]
# default to current directory
local_path = args[1] || "."