Knowing Dominion, it's probably something like:
Gain X or Y
- Name a card which is named either X or Y
- Choose that card
- Pick that card
- Attempt to gain a copy of that card
- Gain a copy of that card
I probably missed some steps.
Anyway, Torturer lets you choose to gain a Curse when they're gone.
I think (not sure) Count lets you pick Duchy when they're gone (even though you'll probably pick +$3 in that case). And I think you can choose "gain a Copper" and not get one if the pile is empty.
So the choice comes before knowing whether you can actually complete the action. Even if you know you can't, you can still pick it.
With Workshop, the choice is indeed a 1-step move and therefore you can't pick to gain a card that's not there. Gain X or Y uses lazy evaluation, it only evaluates "gain X" or "gain Y" when you actually get there. So I don't think this is weird, you only have to think about it a bit.
Still, Gain a Foo or a Bar where you HAVE to take one is a bit awkward.
I don't know what Foo or Bar are, but maybe you can solve this by grouping them into a subtype?
Let's say Foo and Bar are of type Action - Jackson.
You could say: Gain a Jackson.
In that case you have to take whichever is available.
I'm pretty sure Squire makes you take a Spy when trashed if the Goons have run out.