The issue here was that the user was not able to change their profile using --set-profile flag, however the --as flag worked just fine. These flags are identical in behavior. The difference is that in the logic for flag adjudication, we make multiple passes over the command line args so that we don't have to worry about command line flag order and that flags are grouped in precedence of function (settings vs actions).
TL;DR
--set-profile needed to not be recognized as a flag that had been used. It wasn't and thus it was rejected.
The issue here was that the user was not able to change their profile using --set-profile flag, however the --as flag worked just fine. These flags are identical in behavior. The difference is that in the logic for flag adjudication, we make multiple passes over the command line args so that we don't have to worry about command line flag order and that flags are grouped in precedence of function (settings vs actions).
TL;DR --set-profile needed to not be recognized as a flag that had been used. It wasn't and thus it was rejected.