Skip to content

Commit 62ede88

Browse files
committed
Removing PyInquirer dependency, and updating tasks with sudo bundle
There's a fix for the PyInquirer breakage: CITGuru/PyInquirer#194 But PyInquirer doesn't have a maintainer anymore: CITGuru/PyInquirer#159 The sudo bundle update is because some gems have native extensions, and those don't get installed or recognized properly by the subsequent rake build.
1 parent 899d6d2 commit 62ede88

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
invoke
2-
PyInquirer
32
requests

tasks.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import invoke
1111
import invoke.program
12-
import PyInquirer
1312
import requests
1413

1514
script_dir = os.path.dirname(os.path.realpath(__file__))
@@ -25,11 +24,8 @@ def ask_for_confirmation(prompt, batch_mode, default):
2524
)
2625
confirmed = default
2726
else:
28-
conf_questions = [
29-
{"type": "confirm", "name": "continue", "message": prompt, "default": True}
30-
]
31-
conf_answers = PyInquirer.prompt(conf_questions)
32-
confirmed = bool(conf_answers) and conf_answers["continue"]
27+
answer = input(f"{prompt} (y/n): ")
28+
confirmed = answer == "y"
3329
if not confirmed:
3430
sys.exit("Cancelled by user")
3531

@@ -130,7 +126,7 @@ def build_plugin(context):
130126
context.run(
131127
"vagrant ssh -- '(source .bash_profile; "
132128
"cd /mnt/packer-mikrotik/vagrant-plugins-routeros/; "
133-
"bundle install; "
129+
"sudo BUNDLE_SILENCE_ROOT_WARNING=true bundle install; "
134130
"bundle exec rake build)'"
135131
)
136132

0 commit comments

Comments
 (0)