Skip to content

Commit

Permalink
🚑 Fix docker make data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Dec 12, 2023
1 parent 81f895e commit 8fb39b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pagermaid/update/v1402.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from pathlib import Path

data = Path("data")
data.mkdir(exist_ok=True)


def rename(old: Path):
if old.exists():
old_file_name = old.name
new = Path("data") / old_file_name
new = data / old_file_name
if new.exists():
new.unlink()
old.rename(new)
Expand Down
1 change: 1 addition & 0 deletions utils/docker-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ login () {

main () {
cd /pagermaid/workdir || exit
mkdir -p /pagermaid/workdir/data
if [ -f "/pagermaid/workdir/install.lock" ]; then
echo "Hello world!" > /pagermaid/workdir/data/install.lock
fi
Expand Down

0 comments on commit 8fb39b1

Please sign in to comment.