Skip to content

Instantly share code, notes, and snippets.

@frak
Created September 25, 2015 18:47
Show Gist options
  • Save frak/cdfe327a29a37212df5e to your computer and use it in GitHub Desktop.
Save frak/cdfe327a29a37212df5e to your computer and use it in GitHub Desktop.
Task to add 'parameters:' to an empty parameters file
#task to add 'parameters:' to an empty parameters file
task :fix_empty_parameters_yml
do
parameters_path = "app/config/parameters.yml"
run "LEN=$(cat #{shared_path}/#{parameters_path} | wc -c); if [ $LEN -eq 0 ] ; then echo \"parameters:\" > #{shared_path}/#{parameters_path} ; fi"
end
#run the parameters fix task before composer kicks off
before "symfony:composer:install", "fix_empty_parameters_yml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment