Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Fixed mkdir -p for build_path. #213

Merged
merged 1 commit into from
Feb 15, 2016
Merged

Fixed mkdir -p for build_path. #213

merged 1 commit into from
Feb 15, 2016

Conversation

bartoszj
Copy link
Contributor

Hi,

I noticed that the build_path folder was not created by gym when :build_path parameter was passed. Right now current behaviour doesn't break anything because export action on xcodebuild automatically creates the folder. But if in the future someone wants to use this parameter, it would be nice to have this already done.

PS. Sorry that I didn't check this behaviour before 😢

@KrauseFx
Copy link
Contributor

Sorry, so where do you create the folder here? Not sure I completely follow on why this is not working. I'm not a big fan of having those nested ifs here

@KrauseFx
Copy link
Contributor

Oh, and drop me a short email (on my profile), would love to invite you to the Slack channel.

@bartoszj
Copy link
Contributor Author

Ok,

So from the beginning. Currently, the FileUtils.mkdir_p is executed only when Gym.cache[:build_path] is a nil. And this happen only when the :build_path was not provided by the user. But when user provides the :build_path parameter, the whole unless block is not executed and the FileUtils.mkdir_p is also not executed, so the directory will not be created.

In this PR, the FileUtils.mkdir_p will be always executed at least once, because the Gym.cache[:build_path] will be always nil at the beginning.

I hope now it is more clear and sorry for misunderstanding.

KrauseFx added a commit that referenced this pull request Feb 15, 2016
Fixed `mkdir -p` for `build_path`.
@KrauseFx KrauseFx merged commit 171f5bb into fastlane-old:master Feb 15, 2016
@KrauseFx
Copy link
Contributor

Perfect, thank you for clarifying @bartoszj 👍

@bartoszj bartoszj deleted the build_path_fix branch February 15, 2016 20:26
@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants