MCPcopy Create free account
hub / github.com/UiPath/uipathcli / offline

Method offline

plugin/module_manager.go:57–78  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

55}
56
57func (m ModuleManager) offline(name string) (string, error) {
58 definition := m.getDefinition(name)
59 existing := m.findLocalModule(definition)
60 if existing != "" {
61 return m.skippedStatus(definition, existing), nil
62 }
63
64 directory, err := directories.OfflineModules()
65 if err != nil {
66 return m.failedStatus(definition, err), err
67 }
68 path := filepath.Join(directory, definition.ArchiveName)
69
70 progressBar := visualization.NewProgressBar(m.Logger)
71 defer progressBar.Remove()
72 progressBar.UpdatePercentage("downloading...", 0)
73 err = m.download(definition, path, progressBar)
74 if err != nil {
75 return m.failedStatus(definition, err), err
76 }
77 return m.succeededStatus(definition), nil
78}
79
80func (m ModuleManager) Get(name string) (string, error) {
81 definition := m.getDefinition(name)

Callers 1

OfflineMethod · 0.95

Calls 10

getDefinitionMethod · 0.95
findLocalModuleMethod · 0.95
skippedStatusMethod · 0.95
failedStatusMethod · 0.95
RemoveMethod · 0.95
UpdatePercentageMethod · 0.95
downloadMethod · 0.95
succeededStatusMethod · 0.95
OfflineModulesFunction · 0.92
NewProgressBarFunction · 0.92

Tested by

no test coverage detected