composer: Windows bat file does not work correctly

The Windows bat file uses the special %~dp0 thing. This introduces a very strange problem with the installation of Composer:

  • When executing composer like composer, %~dp0 in the bat file refers to the location of the batch (C:\ProgramData\ComposerSetup\bin).
  • When executing composer like "composer", %~dp0 in the bat file refers to the current directory (e.g. C:\Users\Wouter\sf-world\symfony-27).

This introduces a problem when using composer with the Symfony Process component, as it puts double quotes around every passed argument/prefix.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 25 (21 by maintainers)

Most upvoted comments

I would recommend just using Process directly, not using the ProcessBuilder.