Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`<` character in exec task is breaking my Phing build script

Tags:

mysql

phing

I'm trying to setup an mysql import script in Phing, but the "<" is causing XML errors. Any ideas?

<exec command="mysql -u${mysql.username} -p${mysql.password} -h ${mysql.server} ${mysql.database} < ${sql.file}" />

I'm looking at making dbDeploy doing this, but it'd be great if there was an easy way for this to work (single line command versus the multi-line setup of dbDeploy)

like image 416
jmccartie Avatar asked Mar 27 '26 02:03

jmccartie


1 Answers

Escape the character by replacing it with &lt;

like image 89
nickf Avatar answered Mar 28 '26 20:03

nickf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!