[v1.2.4] run(:local) issue
kendertas opened this issue · comments
Hi, I have a problem with 1.2.4 version
I have this task
task :sync do
comment "Syncing application to cache"
excludes = []
excludes += (fetch(:shared_dirs) || [])
excludes += (fetch(:shared_files) || [])
excludes += (fetch(:exclude_files) || [])
excludes += (fetch(:exclude_folders) || [])
exclude_args = excludes.collect { |i| %{--exclude "#{i}"} }.join(" ")
command %{rsync --info=stats2 --delete --force --delete-excluded -az #{exclude_args} . #{fetch(:user)}@#{fetch(:domain)}:#{fetch(:cached_path)}/}
end
that copies (rsync) all local files to the remote server
then I have:
task :deploy do
run(:local) do
ensure!(:domain)
ensure!(:deploy_to)
ensure!(:main_path)
ensure!(:project_folder)
ensure!(:web_folder)
invoke :prepare
invoke :sync
end
(prepare task is empty atm)
The error is something like "command not found", or, in this case
15:27:45 Elapsed time: 0.54 seconds
15:27:45 sh: line 2: echo "-----> Syncing application to cache"
15:27:45
15:27:45
15:27:45 rsync --info=stats2 --delete --force --delete-excluded -az --exclude "var" --exclude "images" --exclude "node_modules/.cache" --exclude "logs" --exclude "node_modules" --exclude ".next" --exclude "node_modules/.cache" . tbd_deploy@publicweb01.triboo.local:/tmp/tbd_deploy/ariston2_public_triboo_it/cached/: No such file or directory
15:27:45
15:27:45 ! Run Error
But it seems that every bash command I use, it's not working.
This same tasks are working fine on version 1.2.3.
The issue seems only with "run(:local)", because "run(:remote)" works.
Any idea?
Am I missing something?
Thanks
Your command is running perfectly! Your command is to run rsync
, which is working because rsync
is giving you an error; it cannot find the remote folder No such file or directory
on the remote server tbd_deploy@publicweb01.triboo.local
. I would check that the file exists because your output does show the rsync command is being executed locally.