The Terminal on OSX fails due to unrecognized flag. This needs to be detected, or environment needs to be detected, so this can be avoided?