项目文件夹

文件
wehub-resource-sync 4e0f4422d0
build-docs / deploy (push) Has been cancelled
Check Markdown links / markdown-link-check (push) Has been cancelled
Pytest / test (3.11) (push) Has been cancelled
Pytest / test (3.12) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:25:42 +08:00

22 行
361 B
Python

#!/usr/bin/env python3
import json
import os
from pathlib import Path
def main():
state_path = Path("/root/state.json")
if state_path.exists():
state = json.loads(state_path.read_text())
else:
state = {}
state["working_dir"] = os.getcwd()
state_path.write_text(json.dumps(state))
if __name__ == "__main__":
main()