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

Podspec prepare command fails on pod install #1080

Closed
tuzonghua opened this issue May 26, 2016 · 1 comment
Closed

Podspec prepare command fails on pod install #1080

tuzonghua opened this issue May 26, 2016 · 1 comment

Comments

@tuzonghua
Copy link

When trying to install Charts, I get the following error from Cocoapods:

-> Installing Charts (2.2.4)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/danielgindi/Charts.git /var/folders/7h/g20c86yx31s6dcrlrgk9c0tm0000gn/T/d20160526-68129-vurm8o --template= --single-branch --depth 1 --branch v2.2.4
     Cloning into '/var/folders/7h/g20c86yx31s6dcrlrgk9c0tm0000gn/T/d20160526-68129-vurm8o'...
     Note: checking out 'f38ea99dbf7567387e729e6c088110e83faf6241'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

 > Running prepare command
   $ /usr/local/bin/bash -c  set -e sed -i '' -e 's/import Charts//g' ChartsRealm/Classes/**/*.swift
   sed: can't read : No such file or directory
[!] /usr/local/bin/bash -c
set -e
sed -i '' -e 's/import Charts//g' ChartsRealm/Classes/**/*.swift

sed: can't read : No such file or directory

I'm using Cocoapods 1.0.0 and Ruby 2.3.0. Not sure if this is a Cocoapods issue or a Charts issue.

@tuzonghua
Copy link
Author

Found the error. I have GNU sed 4.2.2 installed via Homebrew, which overrides the OS X version of sed. From the GNU sed manpage, the -i flag can't have a space between the flag and the argument (-i[SUFFIX]), but for OS X sed, there is a space ([-i extension]).

Fixed by moving GNU sed to use gsed rather than sed.

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

No branches or pull requests

1 participant