File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ You should find the following tools in this repository: -
4646- ` delete-all-instances `
4747- ` delete-old-instances `
4848- ` delete-test-projects `
49+ - ` list-environments `
4950- ` load-er `
5051- ` save-er `
5152
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ """Prints the available environments.
3+ """
4+ import sys
5+ from typing import List
6+
7+ from squonk2 .environment import Environment
8+
9+ environments : List [str ] = Environment .load ()
10+ if not environments :
11+ print ("No environments found" )
12+ sys .exit (1 )
13+
14+ index : int = 1
15+ for environment in environments :
16+ if index == 1 :
17+ print (f"{ index } . { environment } (default)" )
18+ first = False
19+ else :
20+ print (f"{ index } . { environment } " )
21+ index += 1
You can’t perform that action at this time.
0 commit comments