Skip to content

Commit c5ea666

Browse files
authored
Add a default-no confirmation prompt to the conversion script (#277)
1 parent 866323b commit c5ea666

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/gapic-generator/gapic/templates/scripts/fixup_%service_keywords.py.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,13 @@ Note: This tool operates at a best-effort level at converting positional
133133
help='a file to fix up via un-flattening',
134134
)
135135
args = parser.parse_args()
136-
fix_files(args.dirs or [], args.files or [])
136+
print(
137+
"""It is strongly, strongly recommended that you commit outstanding changes and
138+
back up your source tree before running this conversion script.
139+
Please take a moment to do that now if you haven't already.
140+
"""
141+
)
142+
resp = input("Really attempt to convert sources? yes/[no]: ")
143+
if resp == "yes":
144+
fix_files(args.dirs or [], args.files or [])
137145
{% endblock %}

0 commit comments

Comments
 (0)