-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
run :local deletes local files and directories #489
Comments
One minimal taks to reproduce the issue:
And a quick, not yet really verified workaround:
|
I write |
what @kuboon said. Also you could do a |
I know that the expected usage is to have the run(:local) block outside of the deploy. But failing to do so is possibly dangerous to the unaware developer. My idea is more aiming at modifying mina to throw an error in case of the described misuse of run(:local). Would it be helpful to directly check wether 'run' calls are nested? Or maybe a semaphore can be added that directly prevents run(:local) calls while in the deploy block. PS: My original use case for this was to copy over some secrets before the last deploy steps, but after the git clone. Solution was to copy the secrets first (call scp locally), then deploy and create symlinks remotely. This way remote and local steps don't need to be nested. |
I tried using
within the deploy scripts. (in the "deploy do ... end" block, as in the deploy.rb example).
This will delete the local .git directory.
While the comment in the example deploy.rb states that 'run :local' should be used before or after, not during, I still wish there was some kind of protection against this.
Also, lets say we have a task that does local operations, how would the task to be protected from being called within the deploy script? I tried that as well, and it also deleted the local .git directory.
PS: Don't worry, my repo is save. I always wanted to test if the backups work ;-)
The text was updated successfully, but these errors were encountered: