@@ -74,12 +74,12 @@ protected function runInstaller(array $arguments = []): void {
7474
7575 if (!is_dir (static ::$ root . '/.vortex/installer/vendor ' )) {
7676 $ this ->logNote ('Installing dependencies of the Vortex installer ' );
77- $ this ->cmd ('composer --working-dir= ' . static ::$ root . '/.vortex/installer install --no-interaction --no-progress ' );
77+ $ this ->cmd ('composer --working-dir= ' . escapeshellarg ( static ::$ root . '/.vortex/installer ' ) . ' install --no-interaction --no-progress ' );
7878 }
7979
8080 // @todo Convert options to $arguments once
8181 // ProcessTrait::processParseCommand() is fixed.
82- $ cmd = sprintf ('php .vortex/installer/installer.php --no-interaction --destination=%s ' , static ::locationsSut ());
82+ $ cmd = sprintf ('php .vortex/installer/installer.php --no-interaction --destination=%s ' , escapeshellarg ( static ::locationsSut () ));
8383
8484 $ this ->logNote ('Run the installer script ' );
8585 $ this ->cmd (
@@ -134,14 +134,14 @@ protected function buildInstaller(): string {
134134
135135 if (!is_dir ($ installer_dir )) {
136136 $ this ->logNote ('Installing dependencies of the Vortex installer ' );
137- $ this ->cmd ('composer --working-dir= ' . $ installer_dir . ' install --no-interaction --no-progress ' );
137+ $ this ->cmd ('composer --working-dir= ' . escapeshellarg ( $ installer_dir) . ' install --no-interaction --no-progress ' );
138138 $ this ->assertDirectoryExists ($ installer_dir . '/vendor ' , 'Vortex installer vendor directory should exist after installing dependencies ' );
139139 }
140140
141- $ this ->cmd ('composer --working-dir= ' . $ installer_dir . ' build ' , env: ['SHELL_VERBOSITY ' => -1 ], txt: 'Build the Vortex installer PHAR ' );
141+ $ this ->cmd ('composer --working-dir= ' . escapeshellarg ( $ installer_dir) . ' build ' , env: ['SHELL_VERBOSITY ' => -1 ], txt: 'Build the Vortex installer PHAR ' );
142142 $ this ->assertFileExists ($ installer_phar , 'Installer PHAR should be built ' );
143143
144- $ this ->cmd ('php ' . $ installer_phar . ' --version ' );
144+ $ this ->cmd ('php ' . escapeshellarg ( $ installer_phar) . ' --version ' );
145145 $ this ->logNote ('Built Vortex installer: ' . trim ($ this ->processGet ()->getOutput ()));
146146
147147 return $ installer_phar ;
0 commit comments