Not all arguments are passed to yarn
usage: __main__.py yarn [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color] [command ...]
__main__.py yarn: error: unrecognized arguments: --write .