Fix bugs, set constants

This commit is contained in:
2024-10-01 14:29:14 -04:00
parent a54f0629be
commit 03fcbe41ae
20 changed files with 165 additions and 89 deletions

View File

@@ -48,14 +48,11 @@ func (c *Cache) GetProjectFromCwd() (*projects.Project, error) {
func (c *Cache) IsProjectCloned(p *projects.Project) bool {
_, err := os.Stat(c.GetProjectPath(p) + "/.git")
if err == nil {
return true
}
return false
return err == nil
}
func (c *Cache) PrepProjectPath(path string) {
if err := os.MkdirAll(path, 0750); err != nil {
if err := os.MkdirAll(path, 0o750); err != nil {
c.log.Fatal("Failed to prepare project path", c.log.Args(
"path", path,
"error", err,