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
upload_project fails #1574
Comments
It looks like you specify "local_dir" instead of the actual name of the folder ".local_dir" e.g.
should be
|
(update) Well yes, that's true, Using 'local_dir' will pass. The problem is that upload_project cannot handle hidden directories. For this reason, '.local_dir would fail. |
Seems to handle hidden directories for me:
|
Gotcha @ploxiln, I didn't realize that upload_project() required absolute paths for arguments. I will give that a try. |
In your original report, you did specify an absolute path, but you did not specify the correct folder name. In fact, an absolute path is not needed, just any path with more than a single component (meaning, with a slash). This works: from fabric.api import env, task, run, puts
from fabric.contrib.project import upload_project
@task
def test():
upload_project("./.local_dir", "/tmp", use_sudo=True)
|
okay thanks for your input. I think this issue can be closed. |
I am simply trying to copy a directory from my local machine to a virtual machine using fabric.contrib.project.upload_project feature.
my environment is:
python==2.7.12
fabric==1.13.1
here is the directory structure :
.
├── .vagrant
│ └── ...
├── Vagrantfile
├── .local_dir
│ └── file.txt
└── upload_project_test.py
upload_project_test.py contains the following code
this will fail because .local dir is hidden.
it will work properly if '.local_dir; is not hidden, such as 'local_dir'
The text was updated successfully, but these errors were encountered: