{"action":"opened","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/7627","repository_url":"https://api.github.com/repos/CocoaPods/CocoaPods","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/7627/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/7627/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/7627/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/7627","id":313602335,"number":7627,"title":"How to modify local podspec in pre_install hook?","user":{"login":"Langxxx","id":15141808,"avatar_url":"https://avatars3.githubusercontent.com/u/15141808?v=4","gravatar_id":"","url":"https://api.github.com/users/Langxxx","html_url":"https://github.com/Langxxx","followers_url":"https://api.github.com/users/Langxxx/followers","following_url":"https://api.github.com/users/Langxxx/following{/other_user}","gists_url":"https://api.github.com/users/Langxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/Langxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Langxxx/subscriptions","organizations_url":"https://api.github.com/users/Langxxx/orgs","repos_url":"https://api.github.com/users/Langxxx/repos","events_url":"https://api.github.com/users/Langxxx/events{/privacy}","received_events_url":"https://api.github.com/users/Langxxx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-12T07:09:39Z","updated_at":"2018-04-12T07:09:39Z","closed_at":null,"author_association":"NONE","body":"# Report\r\n\r\n## What did you do?\r\nI want to modify some local podspec in `pre_install`  hook.And now, i had been found a way to modify some third-party pods.Like below:\r\n```\r\n//in podfile\r\npod 'Tactile', :git => 'https://github.com/delba/Tactile', :branch => 'master'\r\n//in pre_install hook\r\ninstaller.sandbox.specifications_root.children.each do |podspec|\r\n        if podspec.extname() == '.json'\r\n            code = File.read(podspec)\r\n            json = JSON.parse(code)\r\n            if json['name'] == 'Tactile'\r\n                json['source_files'] = ['Source/**/*.swift']\r\n            end\r\n            File.write(podspec, JSON.generate(json))\r\n        end\r\nend\r\n```\r\nIn this way, everything is ok,the cocoapods can use the new json file to config my project.But it do not work when i do the same way to the local pod.\r\n\r\n```\r\npod 'MessagePack', :path => '../../../MessagePack'\r\n```\r\nthe json file(`**/Pods/Local Podspecs/MessagePack.podspec.json`) had been changed ,but cocoapods did not use  this.\r\n\r\n## What did you expect to happen?\r\nCould you please help me to figure it out\r\n"}}
{"actor":{"display_login":"Langxxx"}}