Fix building plugins to file

This commit is contained in:
Tulir Asokan 2018-12-17 20:55:29 +02:00
parent 69de2c9d85
commit 7cd5b04dbc

View file

@ -126,8 +126,9 @@ def build(path: str, output: str, upload: bool) -> None:
output = BytesIO() output = BytesIO()
os.chdir(path) os.chdir(path)
write_plugin(meta, output) write_plugin(meta, output)
output.seek(0)
if isinstance(output, str): if isinstance(output, str):
print(f"{Fore.GREEN}Plugin built to {Fore.CYAN}{path}{Fore.GREEN}.{Fore.RESET}") print(f"{Fore.GREEN}Plugin built to {Fore.CYAN}{path}{Fore.GREEN}.{Fore.RESET}")
else:
output.seek(0)
if upload: if upload:
upload_plugin(output) upload_plugin(output)