Conditional test not working the same when run from curl.