From 604abc5704f4f152a1d0482f5b5e162aee7e0cf2 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Fri, 6 Feb 2026 15:00:18 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Clean=20up=20temporary=20files?= =?UTF-8?q?=20prior=20to=20phpinfo()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Common/Core/Actions.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpmon/Common/Core/Actions.swift b/phpmon/Common/Core/Actions.swift index f407b7b0..b3dfcd1d 100644 --- a/phpmon/Common/Core/Actions.swift +++ b/phpmon/Common/Core/Actions.swift @@ -123,6 +123,11 @@ class Actions { // MARK: - Other Actions public func createTempPhpInfoFile() async -> URL { + // Clean state for temporary phpinfo files + try? container.filesystem.remove("/tmp/phpmon_phpinfo.php") + try? container.filesystem.remove("/tmp/phpmon_phpinfo.html") + + // Generate a source file that we will execute immediately try! container.filesystem.writeAtomicallyToFile("/tmp/phpmon_phpinfo.php", content: "