Skip to content

Commit

Permalink
show comments for actions
Browse files Browse the repository at this point in the history
fixes #345
  • Loading branch information
trehn committed Jun 1, 2017
1 parent 508d2f8 commit 4a23b72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bundlewrap/items/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime

from bundlewrap.exceptions import ActionFailure, BundleError
from bundlewrap.items import Item
from bundlewrap.items import format_comment, Item
from bundlewrap.utils.ui import io
from bundlewrap.utils.text import mark_for_translation as _
from bundlewrap.utils.text import blue, bold, wrap_question
Expand Down Expand Up @@ -68,13 +68,17 @@ def _get_result(
))
return (self.STATUS_SKIPPED, ["unless"])

question_body = self.attributes['command']
if self.comment:
question_body += format_comment(self.comment)

if (
interactive and
self.attributes['interactive'] is not False and
not io.ask(
wrap_question(
self.id,
self.attributes['command'],
question_body,
_("Run action {}?").format(
bold(self.name),
),
Expand Down

0 comments on commit 4a23b72

Please sign in to comment.