From 7cd5b04dbcc01afeaaa45c0386cc3689c387ec8c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 17 Dec 2018 20:55:29 +0200 Subject: [PATCH] Fix building plugins to file --- maubot/cli/commands/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maubot/cli/commands/build.py b/maubot/cli/commands/build.py index 0f3201c..ce26d5f 100644 --- a/maubot/cli/commands/build.py +++ b/maubot/cli/commands/build.py @@ -126,8 +126,9 @@ def build(path: str, output: str, upload: bool) -> None: output = BytesIO() os.chdir(path) write_plugin(meta, output) - output.seek(0) if isinstance(output, str): print(f"{Fore.GREEN}Plugin built to {Fore.CYAN}{path}{Fore.GREEN}.{Fore.RESET}") + else: + output.seek(0) if upload: upload_plugin(output)