Skip to content
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

Resolve symbolic links for app dir #165

Merged
merged 3 commits into from
May 6, 2019
Merged

Conversation

jromero
Copy link
Member

@jromero jromero commented Apr 19, 2019

Resolves #93

Signed-off-by: Javier Romero j.romero.1214@gmail.com

@ekcasey
Copy link
Member

ekcasey commented Apr 25, 2019

@jromero Apologies, we basically did a wholesale rewrite of build as part of our effort to move all the major commands onto the pack client. But it should be easier to test now 😅

Signed-off-by: Javier Romero <j.romero.1214@gmail.com>
build_test.go Outdated
relLink := filepath.Join("testdata", "some-app.link")

_ = os.Remove(relLink)
h.AssertNil(t, os.Symlink(relLinkRef, relLink))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going to make temporary file for testing we should make them in a temp dir instead of in the repo. We generally only use the testdata dir if we are going to commit the files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full disclosure: I did feel a tad dirty doing it this way.

I initially attempted to follow the prior practice of using fixtures but when it came time to submit the PR I remembered that git doesn't play nice with symlinks. I obviously should have choose a different path. Thanks for the redirection. Hope it's better now.

build_test.go Outdated Show resolved Hide resolved
testdata/.gitignore Outdated Show resolved Hide resolved
build.go Outdated Show resolved Hide resolved
jromero added 2 commits May 4, 2019 13:40
Signed-off-by: Javier Romero <j.romero.1214@gmail.com>
@ekcasey ekcasey merged commit 8ab44f6 into buildpacks:master May 6, 2019
@ekcasey
Copy link
Member

ekcasey commented May 6, 2019

@jromero thanks for the contribution!

@jromero jromero deleted the feature/93 branch May 6, 2019 18:35
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.

pack build fails when app directory is symlinked
2 participants