From 880a5eaad9dcdfd31563385f11ba1f63d38cfd14 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 9 Aug 2026 06:19:30 +0900 Subject: refactor(php-shim): use std::path::MAIN_SEPARATOR over a shim constant The shim's DIRECTORY_SEPARATOR was hardcoded to "/", so every ported `'\\' === DIRECTORY_SEPARATOR` check compared against a constant that does not track the target platform. std::path::MAIN_SEPARATOR and MAIN_SEPARATOR_STR carry the same meaning as PHP's constant and resolve per platform, so the Windows branches are selected on Windows targets. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/symfony/console/helper/question_helper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe-external-packages/src/symfony/console/helper/question_helper.rs') diff --git a/crates/shirabe-external-packages/src/symfony/console/helper/question_helper.rs b/crates/shirabe-external-packages/src/symfony/console/helper/question_helper.rs index 2091225d..f5242d9a 100644 --- a/crates/shirabe-external-packages/src/symfony/console/helper/question_helper.rs +++ b/crates/shirabe-external-packages/src/symfony/console/helper/question_helper.rs @@ -685,7 +685,7 @@ impl QuestionHelper { input_stream: &shirabe_php_shim::PhpResource, trimmable: bool, ) -> anyhow::Result> { - if shirabe_php_shim::DIRECTORY_SEPARATOR == "\\" { + if std::path::MAIN_SEPARATOR == '\\' { let mut exe = format!( "{}/../Resources/bin/hiddeninput.exe", shirabe_php_shim::dir() -- cgit v1.3.1-4-g156e