Skip to content

Commit e6da921

Browse files
Don't pause on CLI menu
1 parent 7a38636 commit e6da921

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

start.ps1

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ function Invoke-Cmd {
5555
Write-Host ""
5656
Write-Host "Command failed: $_" -ForegroundColor Red
5757
Write-Host ""
58-
Invoke-Pause-Menu
5958
return $false
6059
}
6160
finally {
@@ -66,7 +65,6 @@ function Invoke-Cmd {
6665
Write-Host ""
6766
Write-Host "Command exited with code $exitCode" -ForegroundColor Yellow
6867
Write-Host ""
69-
Invoke-Pause-Menu
7068
return $false
7169
}
7270

@@ -101,11 +99,6 @@ except Exception as exc: # pylint: disable=broad-except
10199
}
102100
}
103101

104-
function Invoke-Pause-Menu {
105-
Write-Host ""
106-
Write-Host "=========================="
107-
Read-Host "Press ENTER to return to the menu" | Out-Null
108-
}
109102

110103
while ($true) {
111104
Write-Host ""
@@ -130,26 +123,25 @@ while ($true) {
130123

131124
switch ($choice) {
132125
'1' {
133-
if (Invoke-Cmd (Get-Python) "$RepoRoot/setup/local_setup.py" "--complete-setup") { Invoke-Pause-Menu }
126+
Invoke-Cmd (Get-Python) "$RepoRoot/setup/local_setup.py" "--complete-setup"
134127
}
135128
'2' {
136-
if (Invoke-Cmd (Get-Python) "$RepoRoot/setup/verify_local_setup.py") { Invoke-Pause-Menu }
129+
Invoke-Cmd (Get-Python) "$RepoRoot/setup/verify_local_setup.py"
137130
}
138131
'3' {
139132
Show-AccountInfo
140-
Invoke-Pause-Menu
141133
}
142134
'4' {
143-
if (Invoke-Cmd (Get-Python) "$RepoRoot/shared/python/show_soft_deleted_resources.py") { Invoke-Pause-Menu }
135+
Invoke-Cmd (Get-Python) "$RepoRoot/shared/python/show_soft_deleted_resources.py"
144136
}
145137
'5' {
146-
if (Invoke-Cmd "$RepoRoot/tests/python/run_pylint.ps1") { Invoke-Pause-Menu }
138+
Invoke-Cmd "$RepoRoot/tests/python/run_pylint.ps1"
147139
}
148140
'6' {
149-
if (Invoke-Cmd "$RepoRoot/tests/python/run_tests.ps1") { Invoke-Pause-Menu }
141+
Invoke-Cmd "$RepoRoot/tests/python/run_tests.ps1"
150142
}
151143
'7' {
152-
if (Invoke-Cmd "$RepoRoot/tests/python/check_python.ps1") { Invoke-Pause-Menu }
144+
Invoke-Cmd "$RepoRoot/tests/python/check_python.ps1"
153145
}
154146
'0' {
155147
Write-Host ""

start.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ run_cmd() {
3737
echo ""
3838
echo "Command exited with code $status"
3939
echo ""
40-
pause_prompt
4140
return $status
4241
fi
4342
}
@@ -65,10 +64,6 @@ PY
6564
)
6665
}
6766

68-
pause_prompt() {
69-
echo
70-
read -rp "Press ENTER to return to the menu..." _
71-
}
7267

7368
while true; do
7469
echo ""
@@ -93,30 +88,24 @@ while true; do
9388
case "$choice" in
9489
1)
9590
run_cmd "$(find_python)" "${REPO_ROOT}/setup/local_setup.py" --complete-setup
96-
pause_prompt
9791
;;
9892
2)
9993
run_cmd "$(find_python)" "${REPO_ROOT}/setup/verify_local_setup.py"
100-
pause_prompt
10194
;;
10295
3)
103-
if show_account; then pause_prompt; fi
96+
show_account
10497
;;
10598
4)
10699
run_cmd "$(find_python)" "${REPO_ROOT}/shared/python/show_soft_deleted_resources.py"
107-
pause_prompt
108100
;;
109101
5)
110102
run_cmd "${REPO_ROOT}/tests/python/run_pylint.sh"
111-
pause_prompt
112103
;;
113104
6)
114105
run_cmd "${REPO_ROOT}/tests/python/run_tests.sh"
115-
pause_prompt
116106
;;
117107
7)
118108
run_cmd "${REPO_ROOT}/tests/python/check_python.sh"
119-
pause_prompt
120109
;;
121110
0)
122111
echo ""

0 commit comments

Comments
 (0)