Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.2.4] run(:local) issue #699

Open
kendertas opened this issue Sep 8, 2021 · 1 comment
Open

[v1.2.4] run(:local) issue #699

kendertas opened this issue Sep 8, 2021 · 1 comment

Comments

@kendertas
Copy link

kendertas commented Sep 8, 2021

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" . [email protected]:/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

@dillonhafer
Copy link

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 [email protected]. I would check that the file exists because your output does show the rsync command is being executed locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants