Skip to content
Snippets Groups Projects
Commit 8b4005c2 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

setup-base-dir: create directory and chdir sooner

This seems more correct.
parent 3c05a0f5
No related branches found
No related tags found
No related merge requests found
......@@ -41,5 +41,6 @@
def setup_base_dir(path):
base_path = Path(path)
old_dir = os.curdir
print("Creating folders")
base_path.mkdir(parents=True)
......@@ -44,12 +45,4 @@
print("Creating folders")
base_path.mkdir(parents=True)
base_path.joinpath(RESULT_DIR).mkdir()
base_path.joinpath(BIN_ENV_DIR).mkdir()
base_path.joinpath(DATA_ENV_DIR).mkdir()
install_poulpe()
print("Create symlinks to development Poulpe for suites")
source = (POULPE_DIR / SUITE_DIR).resolve()
old_dir = os.curdir
os.chdir(base_path)
try:
......@@ -54,5 +47,12 @@
os.chdir(base_path)
try:
base_path.joinpath(RESULT_DIR).mkdir()
base_path.joinpath(BIN_ENV_DIR).mkdir()
base_path.joinpath(DATA_ENV_DIR).mkdir()
install_poulpe()
print("Create symlinks to development Poulpe for suites")
source = (POULPE_DIR / SUITE_DIR).resolve()
os.symlink(source, SUITE_DIR)
finally:
os.chdir(old_dir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment