From d8ba8c0ac55c6ab85646c9f635091773e7ba5ab4 Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Tue, 15 Mar 2022 06:53:40 +0100 Subject: [PATCH] fix create plugin under windows --- cbpi/__init__.py | 2 +- cbpi/cli.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cbpi/__init__.py b/cbpi/__init__.py index c7a18d1..30deb30 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1 +1 @@ -__version__ = "4.0.3" +__version__ = "4.0.3.a1" diff --git a/cbpi/cli.py b/cbpi/cli.py index 0698462..b640088 100644 --- a/cbpi/cli.py +++ b/cbpi/cli.py @@ -263,6 +263,10 @@ def plugin_create(): fh.write(outputText) TEMPLATE_FILE = os.path.join("/", name, "config.yaml") + operatingsystem = str(platform.system()).lower() + if operatingsystem.startswith("win"): + TEMPLATE_FILE=str(TEMPLATE_FILE).replace('\\','/') + template = templateEnv.get_template(TEMPLATE_FILE) outputText = template.render(name=name)