repairs plugin creation inside the devcontainer

strange windows volume behaviour needs a small delay
between template folder unzip and rename.
reverts user changes of the dev container
which werent the cause of this problem.
This commit is contained in:
prash3r 2022-09-24 21:55:36 +02:00
parent e7aa0a64c7
commit 50fa87d6df
2 changed files with 5 additions and 2 deletions

View file

@ -47,5 +47,5 @@
//"postCreateCommand": "pip3 install -r ./requirements.txt", //"postCreateCommand": "pip3 install -r ./requirements.txt",
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode" "remoteUser": "vscode"
} }

View file

@ -17,6 +17,7 @@ from importlib_metadata import metadata
from tabulate import tabulate from tabulate import tabulate
from PyInquirer import prompt, print_json from PyInquirer import prompt, print_json
import platform import platform
import time
class CraftBeerPiCli(): class CraftBeerPiCli():
def __init__(self, config) -> None: def __init__(self, config) -> None:
@ -99,8 +100,10 @@ class CraftBeerPiCli():
with ZipFile('temp.zip', 'r') as repo_zip: with ZipFile('temp.zip', 'r') as repo_zip:
repo_zip.extractall() repo_zip.extractall()
time.sleep(1) # windows dev container permissions problem otherwise
os.rename("./craftbeerpi4-plugin-template-main", os.path.join(".", name)) os.rename(os.path.join(".","craftbeerpi4-plugin-template-main"), os.path.join(".", name))
os.rename(os.path.join(".", name, "src"), os.path.join(".", name, name)) os.rename(os.path.join(".", name, "src"), os.path.join(".", name, name))
import jinja2 import jinja2