def Run(self, args): """Runs the list command.""" if properties.VALUES.core.disable_usage_reporting.GetBool() in [ None, True ]: OptInPrompter().Prompt() update_manager = util.GetUpdateManager(args) if args.component_ids and not args.version: install = console_io.PromptContinue( message= 'You have specified individual components to update. If you ' 'are trying to install new components, use:\n $ gcloud ' 'components install {components}'.format( components=' '.join(args.component_ids)), prompt_string='Do you want to run install instead', default=False, throw_if_unattended=False, cancel_on_no=False) if install: update_manager.Install(args.component_ids, allow_no_backup=args.allow_no_backup) return update_manager.Update(args.component_ids, allow_no_backup=args.allow_no_backup, version=args.version)
def Run(self, args): """Runs the list command.""" self._SetFormat(args) update_manager = util.GetUpdateManager(args) result = update_manager.List(show_hidden=args.show_hidden, only_local_state=args.only_local_state) (to_print, self._current_version, self._latest_version) = result return to_print
def Run(self, args): manager = util.GetUpdateManager(args) if manager.IsPythonBundled(): python_location = update_manager.CopyPython() else: python_location = sys.executable # There's no straightforward way to print a string that was returned from # Run() using the formatting, so we wrap it in a dict. return {'python_location': python_location}
def Run(self, args): """Runs the list command.""" update_manager = util.GetUpdateManager(args) result = update_manager.List(show_hidden=args.show_hidden) (to_print, self._current_version, self._latest_version) = result if not to_print: raise StopIteration for c in to_print: yield c yield resource_printer_base.FinishMarker()
def Run(self, args): """Runs the list command.""" update_manager = util.GetUpdateManager(args) update_manager.Install(args.component_ids, allow_no_backup=args.allow_no_backup)
def Run(self, args): """Runs the list command.""" update_manager = util.GetUpdateManager(args) update_manager.Reinstall()