keithpitt / vendor

Dependency management for iOS and OSX development
http://www.vendorkit.com
MIT License
99 stars 7 forks source link

JSON error. #9

Open rauluranga opened 12 years ago

rauluranga commented 12 years ago

Hi! i just updated to the latest version of vendor, and when i try to install a new library, it throws me this error


raul$ vendor install
Unknown format specifier: json
plutil: [command_option] [other_options] file...
The file '-' means stdin
Command options are (-lint is the default):
 -help      show this message and exit
 -lint      check the property list files for syntax errors
 -convert fmt   rewrite property list files in format
        fmt is one of: xml1 binary1
There are some additional optional arguments:
 -s     be silent on success
 -o path    specify alternate file path name for result;
        the -o option is used with -convert, and is only
        useful with one file argument (last file overwrites);
        the path '-' means stdout
 -e extension   specify alternate extension for converted files
 --     specifies that all further arguments are file names
/Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.5/lib/json/common.rb:148:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.5/lib/json/common.rb:148:in `new'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.5/lib/json/common.rb:148:in `parse'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/vendor-0.1.5/lib/vendor/xcode/project.rb:41:in `reload'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/vendor-0.1.5/lib/vendor/xcode/project.rb:29:in `initialize'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/vendor-0.1.5/lib/vendor/cli/app.rb:89:in `new'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/vendor-0.1.5/lib/vendor/cli/app.rb:89:in `install'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/gems/vendor-0.1.5/bin/vendor:14:in `'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/bin/vendor:19:in `load'
    from /Users/raul/.rvm/gems/ruby-1.9.2-p290/bin/vendor:19:in `
'

any ideas??

keithpitt commented 12 years ago

Hrm, thats crazy. Do you still get this issue?

burtlo commented 12 years ago

@rayh noticed this with Xcoder and said there was some issue with systems not having the JSON output from that command-line option. He changed Xcoder to use the XML output so this should be more universal for pre-Lion systems.

burtlo commented 12 years ago

plutil -convert xml1 -o - PROJECTFILENAME is the new mojo and should work pre-Lion.

rayh commented 12 years ago

We then use the plush gem to convert it into a hash that just happens to be the same format as using the -o json flag:

https://github.com/rayh/xcoder/blob/master/lib/xcode/parsers/plutil_project_parser.rb

Sent from my iPad

On 25/03/2012, at 9:15 AM, Franklin Webber reply@reply.github.com wrote:

plutil -convert xml1 -o - PROJECTFILENAME is the new mojo and should work pre-Lion.


Reply to this email directly or view it on GitHub: https://github.com/keithpitt/vendor/issues/9#issuecomment-4677230

samritchie commented 11 years ago

Was this issue solved with xcoder 0.1.9?