diff --git a/proton b/proton index 51991555..a84dd731 100755 --- a/proton +++ b/proton @@ -68,8 +68,14 @@ def append_to_env_str(env, variable, append_str, separator): env[variable] = env[variable] + separator + append_str def log(msg): - sys.stderr.write(PFX + msg + os.linesep) - sys.stderr.flush() + try: + sys.stderr.write(PFX + msg + os.linesep) + sys.stderr.flush() + except OSError: + # e.g. see https://github.com/ValveSoftware/Proton/issues/6277 + # There's not much we can usefully do about this: printing a + # warning to stderr isn't going to work any better the second time + pass def file_is_wine_builtin_dll(path): if os.path.islink(path):