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

Wrong destination path? #5

Open
krainboltgreene opened this Issue Aug 25, 2015 · 11 comments

Comments

Projects
None yet
2 participants
@krainboltgreene

krainboltgreene commented Aug 25, 2015

My command: docker-rsync -watch=false -dst="/usr/src/app" examplevm
My expectation: /usr/src/app/{app|lib|config...}
Actual: /usr/src/example/{app|lib|config...}

@krainboltgreene

This comment has been minimized.

Show comment
Hide comment
@krainboltgreene

krainboltgreene Aug 25, 2015

It doesn't even log correctly?

Syncing /Users/krainboltgreene/Code/company/example (local) to /usr/src/app (docker-machine exaplevm)

krainboltgreene commented Aug 25, 2015

It doesn't even log correctly?

Syncing /Users/krainboltgreene/Code/company/example (local) to /usr/src/app (docker-machine exaplevm)
@mattes

This comment has been minimized.

Show comment
Hide comment
@mattes

mattes Aug 26, 2015

Contributor

I couldn't reproduce this.

Contributor

mattes commented Aug 26, 2015

I couldn't reproduce this.

@krainboltgreene

This comment has been minimized.

Show comment
Hide comment

krainboltgreene commented Aug 26, 2015

@krainboltgreene

This comment has been minimized.

Show comment
Hide comment
@krainboltgreene

krainboltgreene Aug 26, 2015

I'm running based on tag v0.1.1 (The version installed from brew).

krainboltgreene commented Aug 26, 2015

I'm running based on tag v0.1.1 (The version installed from brew).

@mattes

This comment has been minimized.

Show comment
Hide comment
@mattes

mattes Aug 26, 2015

Contributor

Your output looks fine. Maybe I don't understand the issue.

docker-rsync -watch=false -dst="/usr/src/app" laurelandwolf
Syncing /Users/krainboltgreene/Code/laurelandwolf/decoraid (local) to /usr/src/app (docker-machine laurelandwolf)
Contributor

mattes commented Aug 26, 2015

Your output looks fine. Maybe I don't understand the issue.

docker-rsync -watch=false -dst="/usr/src/app" laurelandwolf
Syncing /Users/krainboltgreene/Code/laurelandwolf/decoraid (local) to /usr/src/app (docker-machine laurelandwolf)
@krainboltgreene

This comment has been minimized.

Show comment
Hide comment
@krainboltgreene

krainboltgreene Aug 26, 2015

I'm specifying a destination of /usr/src/app. It's logging /usr/src/app. It's actual destination is /usr/src/{{source directory name}}.

krainboltgreene commented Aug 26, 2015

I'm specifying a destination of /usr/src/app. It's logging /usr/src/app. It's actual destination is /usr/src/{{source directory name}}.

@mattes

This comment has been minimized.

Show comment
Hide comment
@mattes

mattes Aug 26, 2015

Contributor

Ok, I think I know what you mean now. I was mistaken by the typo /ust/... instead of /usr/... in your first comment. Sorry about that.

Please add a trailing slash to your dst path: docker-rsync -watch=false -dst="/usr/src/app/" examplevm.

Contributor

mattes commented Aug 26, 2015

Ok, I think I know what you mean now. I was mistaken by the typo /ust/... instead of /usr/... in your first comment. Sorry about that.

Please add a trailing slash to your dst path: docker-rsync -watch=false -dst="/usr/src/app/" examplevm.

@krainboltgreene

This comment has been minimized.

Show comment
Hide comment
@krainboltgreene

krainboltgreene Aug 26, 2015

Woops, yeah, my bad on that typo.

krainboltgreene commented Aug 26, 2015

Woops, yeah, my bad on that typo.

@krainboltgreene

This comment has been minimized.

Show comment
Hide comment
@krainboltgreene

krainboltgreene Aug 26, 2015

@mattes Okay, that...doesn't really help. It just namespaces my application to app/. When I see a "destination path" I don't assume it means "prefix for destination", I assume it means the absolute path. Presumably that's true for source.

If I'm forced to use the "prefix" version it means I can't make generic docker operations, as every project will have a unique path (/usr/src/{{project}} instead of /usr/src/app).

krainboltgreene commented Aug 26, 2015

@mattes Okay, that...doesn't really help. It just namespaces my application to app/. When I see a "destination path" I don't assume it means "prefix for destination", I assume it means the absolute path. Presumably that's true for source.

If I'm forced to use the "prefix" version it means I can't make generic docker operations, as every project will have a unique path (/usr/src/{{project}} instead of /usr/src/app).

@mattes

This comment has been minimized.

Show comment
Hide comment
@mattes

mattes Aug 26, 2015

Contributor

You're right. Actually I think -dst was called -prefix before. Couldn't find any traces in the commit log though.

We should rename -dst to -prefix and add an actual -dst flag that acts as absolute destination path.

See https://github.com/synack/docker-rsync/blob/master/main.go#L56 and https://github.com/synack/docker-rsync/blob/master/rsync.go#L41

Do you want to open a PR?

Contributor

mattes commented Aug 26, 2015

You're right. Actually I think -dst was called -prefix before. Couldn't find any traces in the commit log though.

We should rename -dst to -prefix and add an actual -dst flag that acts as absolute destination path.

See https://github.com/synack/docker-rsync/blob/master/main.go#L56 and https://github.com/synack/docker-rsync/blob/master/rsync.go#L41

Do you want to open a PR?

@krainboltgreene

This comment has been minimized.

Show comment
Hide comment
@krainboltgreene

krainboltgreene Aug 26, 2015

💚💚💚💚💚💚 Will do, I've never done Go before :3

krainboltgreene commented Aug 26, 2015

💚💚💚💚💚💚 Will do, I've never done Go before :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment