MCPcopy Create free account
hub / github.com/jetify-com/devbox / initCloudDir

Function initCloudDir

internal/services/status.go:95–104  ·  view source on GitHub ↗

initCloudDir creates the service status directory and a .gitignore file

(projectDir, hostID string)

Source from the content-addressed store, hash-verified

93
94// initCloudDir creates the service status directory and a .gitignore file
95func initCloudDir(projectDir, hostID string) error {
96 cloudDirPath := cloudFilePath(projectDir)
97 _ = os.MkdirAll(filepath.Join(cloudDirPath, hostID), 0o755)
98 gitignorePath := filepath.Join(cloudDirPath, ".gitignore")
99 _, err := os.Stat(gitignorePath)
100 if !errors.Is(err, fs.ErrNotExist) {
101 return nil
102 }
103 return errors.WithStack(os.WriteFile(gitignorePath, []byte("*"), 0o644))
104}
105
106type ServiceStatus struct {
107 LocalPort string `json:"local_port"`

Callers 1

ListenToChangesFunction · 0.85

Calls 2

cloudFilePathFunction · 0.85
IsMethod · 0.80

Tested by

no test coverage detected