Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.extension
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.extension
Commits
24f01f88
Commit
24f01f88
authored
Sep 18, 2019
by
Guillaume HEUSCH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[config] correct handle of the --force option
parent
ed1dcdf1
Pipeline
#33442
passed with stage
in 6 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
bob/extension/scripts/config.py
bob/extension/scripts/config.py
+10
-6
No files found.
bob/extension/scripts/config.py
View file @
24f01f88
...
...
@@ -133,13 +133,17 @@ def unset(substr, contain=False, force=False):
logger
.
error
(
"The key containing '{}' was not found in the rc file"
.
format
(
substr
))
raise
click
.
ClickException
(
"Failed to change the configuration."
)
click
.
echo
(
"Registered for deletion:"
)
for
key
in
to_delete
:
click
.
echo
(
'- "{}" : "{}"'
.
format
(
key
,
rc
[
key
]))
delete
=
click
.
confirm
(
"Are you sure you want to delete all this ?"
)
if
delete
:
if
force
:
for
key
in
to_delete
:
del
rc
[
key
]
else
:
click
.
echo
(
"Registered for deletion:"
)
for
key
in
to_delete
:
click
.
echo
(
'- "{}" : "{}"'
.
format
(
key
,
rc
[
key
]))
delete
=
click
.
confirm
(
"Are you sure you want to delete all this ?"
)
if
delete
:
for
key
in
to_delete
:
del
rc
[
key
]
_saverc
(
rc
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment