Invalid environment value deploys to production
Using SWA version: 1.0.1
Are you accessing the CLI from the default port :4280 ?
- [ ] No, I am using a different port number (
--port) and accessing the CLI from that port - [x] Yes, I am accessing the CLI from port
:4280
Describe the bug
Deploying the SWA using swa deploy --app-location ./packages/frontend --api-location ./packages/api --env no-src deploys to Production even though it gives an error saying ✖ The environment name provided has invalid character(s). Valid characters are 0-9, a-z, and A-Z.
Screenshot of terminal when executing the command (I also included a date to show that it is around that timeframe. Laptop is kind of slow so it takes a bit to execute the script):

Screenshot of Azure SWA environments:

To Reproduce Steps to reproduce the behavior:
- Create SWA app
- Type in command
swa deploy --app-location ./packages/frontend --api-location ./packages/api --env no-src - See error:
✖ The environment name provided has invalid character(s). Valid characters are 0-9, a-z, and A-Z - View Azure dashboard and see deployment to Production is in progress
Expected behavior A deployment to Production should not happen if the environment name variable syntax is wrong
Desktop (please complete the following information):
- OS: macOS
- Version 12.2.1
Thanks @Ensar025 for pointing this out, we will look into this.