mirror of
https://github.com/Cockatrice/Magic-Spoiler.git
synced 2026-03-21 17:54:59 -05:00
fix exception when spoiler season is inactive
This commit is contained in:
parent
c24ab7574d
commit
4b25618657
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
|
@ -53,7 +53,7 @@ jobs:
|
|||
run: python3 -m magic_spoiler
|
||||
|
||||
- name: Deploy changes
|
||||
if: env.DEPLOY == 'true' && steps.run.outputs.deploy != null
|
||||
if: env.DEPLOY == 'true' && steps.run.outputs.deploy == 'true'
|
||||
shell: bash
|
||||
working-directory: ${{env.OUTPUT_PATH}}
|
||||
run: |
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -85,6 +85,8 @@ celerybeat-schedule
|
|||
# virtualenv
|
||||
venv/
|
||||
ENV/
|
||||
bin/
|
||||
pyvenv.cfg
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ def delete_old_files() -> bool:
|
|||
shutil.rmtree(OUTPUT_TMP_DIR)
|
||||
|
||||
if not SPOILER_SETS.get():
|
||||
OUTPUT_DIR.joinpath("SpoilerSeasonEnabled").unlink()
|
||||
OUTPUT_DIR.joinpath("SpoilerSeasonEnabled").unlink(missing_ok=True)
|
||||
else:
|
||||
OUTPUT_DIR.joinpath("SpoilerSeasonEnabled").open("w").write(" ")
|
||||
|
||||
|
|
@ -643,6 +643,8 @@ def main() -> None:
|
|||
# Set output to deploy
|
||||
if changed:
|
||||
print("::set-output name=deploy::true")
|
||||
else:
|
||||
print("::set-output name=deploy::false")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user