Read SLACK_BOT_NAME from vm.env if it exists.
()
| 77 | |
| 78 | |
| 79 | def get_existing_bot_name() -> str | None: |
| 80 | """Read SLACK_BOT_NAME from vm.env if it exists.""" |
| 81 | if not VM_ENV_PATH.exists(): |
| 82 | return None |
| 83 | with open(VM_ENV_PATH, "r") as f: |
| 84 | for line in f: |
| 85 | line = line.strip() |
| 86 | if line.startswith("SLACK_BOT_NAME="): |
| 87 | value = line.split("=", 1)[1].strip().strip('"').strip("'") |
| 88 | return value if value else None |
| 89 | return None |
| 90 | |
| 91 | |
| 92 | def customize_manifest( |