Command line upload or verify not working

Greetings,

I am using the IDE version 1.8.1 and I am trying to upload a sketch to my connected arduino due device via the command line (I am on OSX El Capitan). For some reason, whether I try to upload or verify the command quits after the "Verifying.." line.

Aquila:crossover Admin$ arduino --upload crossover.ino --board arduino:sam:arduino_due_x_dbg --port /dev/cu.usbmodemFD121
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...

Aquila:crossover Admin$

It attempts to open the IDE for a moment, and then it shuts. If I upload via the IDE it works fine, however I need this to happen via command line as I will be generating sketches based on parameters in python and running a shell script for the upload. Could anyone please help?

Cheers

EDIT: I've downgraded to 1.6, that seemed to work. Please look into this!

I had the same problem. I am running 1.8.1 on Ubuntu.

When I invoked aurduino --verify or --upload from my directory containing the sketch, I experienced the same behaviour as you. That is, it started fine, but quit after writing the "Verifying..." message and did nothing further. It worked from the IDE.

Then I tried invoking the the command from the directory where I installed aurdino. That worked fine.