Skip to content

Instantly share code, notes, and snippets.

@renzors
Created November 30, 2017 20:24
Show Gist options
  • Save renzors/bd5834d0bf1063793cb095ee835cd9a8 to your computer and use it in GitHub Desktop.
Save renzors/bd5834d0bf1063793cb095ee835cd9a8 to your computer and use it in GitHub Desktop.
# Clean old files
del composer_update_*.txt
# Start composer (we just let it timeout and redirect output and exit code to files)
composer update 1> composer_update_output.txt 2> composer_update_error.txt & echo %errorLevel% > composer_update_exitcode.txt
# Then we actively wait until exitcode file exist as a flag on execution end
if exist composer_update_exitcode.txt (echo exit) else (echo still running)
# Then we get the data from files
type composer_update_output.txt
type composer_update_error.txt
type composer_update_exitcode.txt | find "0"
# And finally we clean the environment
del composer_update_*.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment