Skip to content

Instantly share code, notes, and snippets.

@AviDuda
Last active September 15, 2016 23:20
Show Gist options
  • Save AviDuda/e22684c1f627ffbff6ffce7315607a27 to your computer and use it in GitHub Desktop.
Save AviDuda/e22684c1f627ffbff6ffce7315607a27 to your computer and use it in GitHub Desktop.
WTServer Composer doesn't handle "composer global require" well - this should fix it.
@ECHO off
REM WTServer Composer doesn't handle "composer global require" well - this should fix it.
SET COMPOSER_HOME=c:\wtserver\bin\composer
SET COMPOSER_CACHE_DIR=c:\wtserver\bin\composer
SET composercmd=php "c:\wtserver\bin\composer\composer.phar"
IF "%1" == "global" (
SET cwd=%COMPOSER_HOME%
) ELSE (
SET cwd=%cd%
SET "cwd=%cwd:\=/%"
SET composercmd=%composercmd% --working-dir="%cwd%"
)
%composercmd% %*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment