I'm writing a script for zsh that essentially just needs to know the exit code of the following gradle command: ./gradlew installDebug
. In other words, I don't want any output to the console while running this. I've tried the following:
./gradlew installDebug -q > /dev/null; 2>&1
This eliminates 99% of the output, but I still get lines like the following:
Note: Generating a MembersInjector for com.example.ui.BaseActivity. Prefer to run the dagger processor over that class instead.
Note: Generating a MembersInjector for com.example.widget.nav.NavigationDrawerActivity. Prefer to run the dagger processor over that class instead.
Note: Generating a MembersInjector for com.example.fragment.ShiftListFragment. Prefer to run the dagger processor over that class instead.
These warnings are coming from lint, which, in general, I want to keep (for when I build manually, without this script). I simply want to suppress the output in this one specific case.
I feel like I'm simply not redirecting output for a given stream correctly.