MCPcopy
hub / github.com/spicetify/cli / GetExtensionPath

Function GetExtensionPath

src/utils/path-utils.go:210–224  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

208}
209
210func GetExtensionPath(name string) (string, error) {
211 extFilePath := filepath.Join(userExtensionsFolder, name)
212
213 if _, err := os.Stat(extFilePath); err == nil {
214 return extFilePath, nil
215 }
216
217 extFilePath = filepath.Join(GetExecutableDir(), "Extensions", name)
218
219 if _, err := os.Stat(extFilePath); err == nil {
220 return extFilePath, nil
221 }
222
223 return "", errors.New("extension not found")
224}

Callers 5

pushExtensionsFunction · 0.92
nodeModuleSymlinkFunction · 0.92
ExtensionPathFunction · 0.92
ExtensionAllPathFunction · 0.92
WatchExtensionsFunction · 0.92

Calls 1

GetExecutableDirFunction · 0.85

Tested by

no test coverage detected