proper handling of --env
expect value error