@@ -10,15 +10,15 @@ class RunSPC
1010{
1111 public static function run (bool $ debug = false , string $ phpVersion = '8.4 ' , ?array $ packages = null ): bool
1212 {
13- $ craftYmlDest = BASE_PATH . '/vendor/crazywhalecc/static-php-cli/ craft.yml ' ;
13+ $ craftYmlDest = BASE_PATH . '/craft.yml ' ;
1414
1515 // Render the template using the TwigRenderer
1616 try {
1717 $ craftYml = TwigRenderer::renderCraftTemplate ($ phpVersion , null , $ packages );
1818
1919 // Write the rendered craft.yml to the destination
2020 if (!file_put_contents ($ craftYmlDest , $ craftYml )) {
21- echo "Failed to write updated craft.yml to static-php-cli vendor directory . \n" ;
21+ echo "Failed to write updated craft.yml to project root . \n" ;
2222 return false ;
2323 }
2424 } catch (\Exception $ e ) {
@@ -27,12 +27,12 @@ public static function run(bool $debug = false, string $phpVersion = '8.4', ?arr
2727 }
2828
2929 // Build the command arguments
30- $ args = ['bin/spc ' , 'craft ' ];
30+ $ args = ['vendor/ bin/spc ' , 'craft ' ];
3131 if ($ debug ) {
3232 $ args [] = '--debug ' ;
3333 }
3434
35- $ process = new Process ($ args , BASE_PATH . ' /vendor/crazywhalecc/static-php-cli ' , env: ['CI ' => true ]);
35+ $ process = new Process ($ args , BASE_PATH , env: ['CI ' => true ]);
3636 $ process ->setTimeout (null );
3737 if (Process::isTtySupported ()) {
3838 $ process ->setTty (true ); // Interactive mode
@@ -59,7 +59,7 @@ public static function run(bool $debug = false, string $phpVersion = '8.4', ?arr
5959 private static function copyBuiltFiles (string $ phpVersion ): void
6060 {
6161 // Copy the built PHP binaries to our build directory
62- $ sourceDir = BASE_PATH . '/vendor/crazywhalecc/static-php-cli/ buildroot ' ;
62+ $ sourceDir = BASE_PATH . '/buildroot ' ;
6363 $ buildDir = BUILD_ROOT_PATH ;
6464 $ baseBuildDir = BASE_PATH . '/build ' ;
6565
0 commit comments