-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: Do not create base folder on remote when uploading dir #75
Conversation
b52bea0
to
1aff2a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Novakov,
First, sorry for the delay in the review.
Looking at the code, this does look consistent with what the UploadDir
function is supposed to do, so I'm enclined to approve this.
I left a small suggestion to the actual change regarding src
, just to be sure we are not globbing the directory's name itself, otherwise this will continue behaving as it does now, with the extra added risk of having other directories copied at the same time.
Other than that, this looks good to me, I'll come back to this PR when you've had a chance to address this feedback.
Alternatively if you prefer or lack time to fix this, I can take care of that, please let me know if that's the case.
Thanks for the PR!
1aff2a4
to
a2b80fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the reroll @Novakov, much appreciated.
Will merge this today
@@ -12,6 +12,7 @@ import ( | |||
"os/exec" | |||
"path/filepath" | |||
"syscall" | |||
"strings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the imports aren't in alphabetical order here, our linters fail.
Could you run goimports on the file and update this PR? I couldn't do it since I don't have the permission to push on your remote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be better now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good indeed, many thanks @Novakov !
Calling lxc files push dir/ instance:/tmp/abc will create folder /tmp/abc/dir with all files inside which does not match behavior expected by Packer - files should be placed directly under /tmp/abc. Use lxc files push dir/* to upload files to proper directory
a2b80fc
to
cb90231
Compare
Calling lxc files push dir/ instance:/tmp/abc will create folder /tmp/abc/dir with all files inside which does not match behavior expected by Packer - files should be placed directly under /tmp/abc.
Use lxc files push dir/* to upload files to proper directory
Closes #7