Skip to content

Conversation

@troglodyne
Copy link
Contributor

Don't unlink during END for your tempfile when a tempdir is already set to cleanup in END and passed in as the workdir.

Possibly I could be more intelligent about this and maybe check if workdir is not matching ^yath- (set by App::Yath::Tester), but thus far I don't yet see a context where this wouldn't be true, so it just doesn' seem worth checking for.

Don't unlink during END for your tempfile when a tempdir is already
set to cleanup in END and passed in as the workdir.

Possibly I could be more intelligent about this and maybe check if
workdir is *not* matching `^yath-` (set by App::Yath::Tester), but
thus far I don't yet see a context where this wouldn't be true, so
it just doesn' seem worth checking for.
@troglodyne
Copy link
Contributor Author

troglodyne commented Oct 23, 2025

Leaving some notes here on things I've noticed thus far when trying to add a test for this but I'm getting tired:
I need to find a way to force Collector.pm's setup_child_input to have +TEST_SETTINGS with an input instead of input_file, as that's the route where this bug triggers. I'm guessing this involves forcing the App::Yath::Tester::yath invocation to have args that force usage of that so that we need to setup the input-$$-XXXX file there.

@exodist
Copy link
Member

exodist commented Nov 16, 2025

I do not think this needs extra testing, I think this fix is fine.

@exodist exodist merged commit a4fb69d into Test-More:2.0 Nov 16, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants