Skip to content

Conversation

@ido-ran
Copy link

@ido-ran ido-ran commented Jul 22, 2013

The Tar library use Environment.CurrentDirectory as reference path so it is needed to change it when using specified source-directory.
When specifying source-directory parameter validate the directory really exists.

The Tar library use Environment.CurrentDirectory as reference path so it is needed to change it when using specified source-directory.
When specifying source-directory parameter validate the directory really exists.
@runesoerensen
Copy link
Contributor

Ido, thanks for this contribution. Just need to make sure I understand the actual issue - why is it necessary to change the current environment's directory while packing the files? I just tried it and the generated tarball seems just fine without changing the current directory.

I take it that you've encountered an issue that prompted this change?

@ido-ran
Copy link
Author

ido-ran commented Sep 6, 2013

Yes, I encounter an issue when the source directory is a relative path. The specific scenario I have is that MSBuild create the site binary files inside the project directory\obj\package so when I pass this relative path the resulting zipped file preserve this relative path and when extracting it to AppHarbor the site does not work because if that. 

Please try to deploy using source directory that is relative to see the problem. 

@runesoerensen
Copy link
Contributor

Oh alright - how about detecting if the path is relative when the parameter is specified, and then prepend the relative path with the current directory path if it is? That way we can avoid changing the environment altogether

@ido-ran
Copy link
Author

ido-ran commented Sep 17, 2013

I'll give it a try, I see how this is better implementation.

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

Successfully merging this pull request may close these issues.

2 participants