Closed orta closed 8 years ago
The default action of pod lib create
is to do this.
It seems that file_accessor
is nil
for development pods, but not for regular ones.
From what I've seen, the file_accessor
already checks for LICENSE
(http://www.rubydoc.info/gems/cocoapods/Pod/Sandbox/FileAccessor#license-instance_method).
I've checked that sandbox.pod_dir(spec.name)
is returning an invalid path for a local Pod. Is it a bug on CocoaPods itself?
The documentation says:
Returns the path where the Pod with the given name is stored, taking into account whether the Pod is locally sourced.
@marcelofabri is it the same Sandbox
instance as the CocoaPods installer is using? Because the list of development pods is stored in an ivar.
Nop, it's created here: https://github.com/CocoaPods/cocoapods-acknowledgements/blob/master/lib/cocoapods_acknowledgements.rb#L50.
However, I haven't found an obvious way to get the Sandbox
from a PostInstallHooksContext
.
Yeah.... maybe the context should pass the Sandbox instead of just the path?
I think it's the better way to solve this, but I don't have the full overview of what it means for plugins in general. (Does this change enable plugins to do something they shouldn't? If it does, is it a problem?)
@segiddins ping on this? This needs a change in CocoaPods itself, right?
Yeah.
So, the only change need is storing sandbox
here: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/installer/post_install_hooks_context.rb#L46? If so, I'll happily make a PR.
Correct.
@segiddins This still needs work to use the provided sandbox
.
@marcelofabri it closed automatically
:speak_no_evil:
We should see if nothing is there, and if so pop in the contents of
LICENSE