-
Notifications
You must be signed in to change notification settings - Fork 665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template Yamls: Fix error due to colon in game name #4106
Template Yamls: Fix error due to colon in game name #4106
Conversation
that's not the proper fix, like further below, you'll want to use yaml dump. |
thanks berserker66 for pointing out to me that I was doing this the completly wrong way, so I fixed it up
Ok, just fixed it according to your suggestion I haven't been able to actually test it yet with an apworld with a colon in the game name right now, but I can later. I have confirmed that this works for existing apworlds, though. |
So I added a function to clean up filenames, however, the regex it uses is really nasty. Should I replace it with something else, like looping over all chars and removing the illegal ones? |
this should fix the github actions issue maybe hopefully
We have |
Ah, whoops, my bad, I should have checked for that. I've updated the code to use that function now. |
Was this properly tested now? |
I have tested that it works with yamls, but I have not yet tested if it breaks things such as webhost |
I wrote a test for this: gurglemurgle5#1 |
Test: add test for option yaml with colon
ok currently game names with special characters break webhost, so this fix should not be relied on until webhost also gets fixed |
it should be fine for apworlds, but not worlds that get added to core |
this mirrors the change in ArchipelagoMW/ArchipelagoMW#4106 in WebHost
* WebHost: use new safe yaml template filename this mirrors the change in ArchipelagoMW/#4106 in WebHost * WebHost: install docs into safe filename and require docs to be named safe * Test: update doc test for safe name * WebHost: fix import order to not break ModuleUpdate
What is this fixing or adding?
There's currently a bug where if a game has a colon in it's name, the outputted template yaml
has invalid syntax. This should fix that
How was this tested?
Generating template yamls, and looking at them to make sure they looked correct. I also generated a world with a couple games to make sure that yamls were still valid for generation.
NEEDED TESTING: apparently having colons in the game name might break the webhost? I haven't verified this for myself yet, but I'm gonna try and check it out
If this makes graphical changes, please attach screenshots.
there should be no changes for games that do not have colons in their names