Merge pull request #522 from mesosphere/issue-409

don't print {pre|post}InstallNotes if only installing cli subcommand
This commit is contained in:
José Armando García Sancio
2016-03-08 16:36:53 -08:00
2 changed files with 4 additions and 6 deletions

View File

@@ -359,7 +359,7 @@ def _install(package_name, package_version, options_path, app_id, cli, app,
pkg_json = pkg.package_json()
pre_install_notes = pkg_json.get('preInstallNotes')
if pre_install_notes:
if app and pre_install_notes:
emitter.publish(pre_install_notes)
if not _confirm('Continue installing?', yes):
emitter.publish('Exiting installation.')
@@ -402,7 +402,7 @@ def _install(package_name, package_version, options_path, app_id, cli, app,
commands))
post_install_notes = pkg_json.get('postInstallNotes')
if post_install_notes:
if app and post_install_notes:
emitter.publish(post_install_notes)
return 0

View File

@@ -648,11 +648,9 @@ def test_list_cli():
_list_remove_nulls(stdout=stdout)
_uninstall_helloworld()
stdout = (b"A sample pre-installation message\n"
b"Installing CLI subcommand for package [helloworld] " +
stdout = (b"Installing CLI subcommand for package [helloworld] " +
b"version [0.1.0]\n"
b"New command available: dcos helloworld\n"
b"A sample post-installation message\n")
b"New command available: dcos helloworld\n")
_install_helloworld(args=['--cli', '--yes'], stdout=stdout)
stdout = b"""\