From 4201e3299035018d949a2e3267af031a92e9aa56 Mon Sep 17 00:00:00 2001 From: pseusys Date: Sun, 26 Feb 2023 10:33:20 +0100 Subject: [PATCH] readme content escaped --- sources/manager_environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/manager_environment.py b/sources/manager_environment.py index fe0930a..7436ce2 100644 --- a/sources/manager_environment.py +++ b/sources/manager_environment.py @@ -51,5 +51,6 @@ class EnvironmentManager: def set_github_output(name: str, content: str): if "GITHUB_OUTPUT" not in environ.keys(): raise Exception("Not in GitHub environment ('GITHUB_OUTPUT' not defined)!") + escaped = content.replace("%", "%25").replace("\n", "%0A").replace("\r", "%0D") with open(environ["GITHUB_OUTPUT"], "a") as fh: - fh.write(f"{name}={content}") + fh.write(f"{name}={escaped}")