databio / projectInit

R project initialization
http://code.databio.org/projectInit
2 stars 1 forks source link

firstExtantFile doesn't error correctly #11

Closed nsheff closed 5 years ago

nsheff commented 7 years ago

firstExtantFile will return NA, instead of an error, if provided a bad file path

firstExtantFile(list(one="blah"))
<NA> 
  NA 

this causes problems in findConfigFile, which doesn't return NULL (which is what it seems to want to do in case of no return), but instead returns NA.

Is this the intended behavior?

vreuter commented 7 years ago

From the docstring it appears so, but I think it's written that way more as a notice of natural behavior without any additional handling from the function itself. Happy to change to NULL; I can't imagine use of this has spread far enough to result in far-flung ramifications for changing it.

nsheff commented 5 years ago

revamped in major revision.