MCPcopy Create free account
hub / github.com/HashLoad/boss / installModules

Function installModules

setup/setup.go:98–122  ·  view source on GitHub ↗
(modules []string)

Source from the content-addressed store, hash-verified

96}
97
98func installModules(modules []string) {
99 pkg, _ := models.LoadPackage(true)
100 dependencies := pkg.Dependencies.(map[string]interface{})
101 encountered := 0
102 for _, newPackage := range modules {
103 for installed := range dependencies {
104 if strings.Contains(installed, newPackage) {
105 encountered++
106 }
107 }
108 }
109
110 nextUpdate := env.GlobalConfiguration.LastInternalUpdate.
111 AddDate(0, 0, env.GlobalConfiguration.PurgeTime)
112
113 if encountered == len(modules) && time.Now().Before(nextUpdate) {
114 return
115 }
116
117 env.GlobalConfiguration.LastInternalUpdate = time.Now()
118 env.GlobalConfiguration.SaveConfiguration()
119
120 installer.GlobalInstall(modules, pkg, false, false)
121 moveBptIdentifier()
122}
123
124func moveBptIdentifier() {
125 var OutExeCompilation = filepath.Join(env.GetGlobalBinPath(), consts.BplIdentifierName)

Callers 1

InitializeFunction · 0.85

Calls 4

LoadPackageFunction · 0.92
GlobalInstallFunction · 0.92
moveBptIdentifierFunction · 0.85
SaveConfigurationMethod · 0.80

Tested by

no test coverage detected