node-xcode icon indicating copy to clipboard operation
node-xcode copied to clipboard

addToLibrarySearchPath breaks when value is not an array

Open grabbou opened this issue 8 years ago • 2 comments

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.

grabbou avatar May 27 '16 22:05 grabbou

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

imhotep avatar May 29 '16 16:05 imhotep

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

tiagojdf avatar Jul 25 '16 13:07 tiagojdf