Yes, there is way we can define or modify our launch.json file in such a way that before publishing any custom app it ask me to the right environment to publish.

See below

Open the lanuch.json file from your app file.

Put the new configuration schema as many environment you have like I do.

In my case I do have two environment

1. Dev_Sandbox

2. Test_Sandbox

 

Save it and try to Publish or Download the symbol

 

So I am trying to download the symbol, as soon as you hit that command Command line will start show you which environment you want to choose so that you can download the symbol in same.

The same sandbox name we defined earlier start flowing here.

 

 

 

Choose the one and enjoy 🙂