In a pinch, you can use rum instead of cognac. Or, if you don't keep any hard alcohol around, just use more white wine. The onions will lack some depth of flavor without the cognac (or rum), but they'll still be very tasty.