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

Function getThemeFolder

src/cmd/cmd.go:226–242  ·  view source on GitHub ↗
(themeName string)

Source from the content-addressed store, hash-verified

224}
225
226func getThemeFolder(themeName string) string {
227 folder := filepath.Join(userThemesFolder, themeName)
228 _, err := os.Stat(folder)
229 if err == nil {
230 return folder
231 }
232
233 folder = filepath.Join(utils.GetExecutableDir(), "Themes", themeName)
234 _, err = os.Stat(folder)
235 if err == nil {
236 return folder
237 }
238
239 utils.PrintError(`Theme "` + themeName + `" not found`)
240 os.Exit(1)
241 return ""
242}
243
244// ReadAnswer prints out a yes/no form with string from `info`
245// and returns boolean value based on user input (y/Y or n/N) or

Callers 2

initCmdColorFunction · 0.85
InitSettingFunction · 0.85

Calls 2

GetExecutableDirFunction · 0.92
PrintErrorFunction · 0.92

Tested by

no test coverage detected