MCPcopy Create free account
hub / github.com/exercism/cli / DefaultWorkspaceDir

Function DefaultWorkspaceDir

config/config.go:105–111  ·  view source on GitHub ↗

DefaultWorkspaceDir provides a sensible default for the Exercism workspace. The default is different depending on the platform, in order to best match the conventions for that platform. It places the directory in the user's home path.

(cfg Config)

Source from the content-addressed store, hash-verified

103// the conventions for that platform.
104// It places the directory in the user's home path.
105func DefaultWorkspaceDir(cfg Config) string {
106 dir := cfg.DefaultDirName
107 if cfg.OS != "linux" {
108 dir = strings.Title(dir)
109 }
110 return filepath.Join(cfg.Home, dir)
111}
112
113// Save persists a viper config of the base name.
114func (c Config) Save(basename string) error {

Calls

no outgoing calls