Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more tests
  • Loading branch information
shenglol committed Feb 8, 2021
commit 4538abcc74b786fb4b49ba441b61e990eaa5ded6
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,9 @@ def load_arguments(self, _):

with self.argument_context('bicep build') as c:
c.argument('file', arg_type=CLIArgumentType(options_list=['--file', '-f'], completer=FilesCompleter(),
type=file_type, help="a Bicep file path in the file system"))
type=file_type, help="a Bicep file path in the file system."))
c.argument('stdout', arg_type=CLIArgumentType(options_list=['--stdout'], action='store_true',
help="When set, prints all output to stdout instead of corresponding files."))

with self.argument_context('bicep install') as c:
c.argument('version', options_list=['--version', '-v'], help='The version of Bicep CLI to be installed. Default to the latest if not specified.')
7 changes: 5 additions & 2 deletions src/azure-cli/azure/cli/command_modules/resource/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3187,8 +3187,11 @@ def upgrade_bicep_cli(cmd):
latest_release_tag = get_bicep_latest_release_tag()
ensure_bicep_installation(release_tag=latest_release_tag)

def build_bicep_file(cmd, file):
run_bicep_command("build", file)
def build_bicep_file(cmd, file, stdout=None):
if stdout:
print(run_bicep_command("build", file, "--stdout"))
else:
run_bicep_command("build", file)

def show_bicep_cli_version(cmd):
print(run_bicep_command("--version"))
Expand Down
Loading