alunny / node-xcode

tools and utilities for working with xcode/ios projects
Apache License 2.0
225 stars 105 forks source link

addToLibrarySearchPath breaks when value is not an array #94

Open grabbou opened 8 years ago

grabbou commented 8 years ago

https://github.com/alunny/node-xcode/blob/master/lib/pbxProject.js#L1146. On this line we only check if value is $(inherited) and convert it to an array otherwise. I've seen projects that have other, non $(inherited) single value there, which causes the script to break with .push is undefined since the value will be a string.

I think we could just replace that check with !Array.isArray() which should make it more future proof.

imhotep commented 8 years ago

@grabbou you are welcome to send a pull request for this one with a test that reveals the failure.

tiagojdf commented 8 years ago

Similar for addToOtherLinkerFlags https://github.com/alunny/node-xcode/issues/100