Skip to content

Commit

Permalink
Renamed venv_path to venvPath. Removed debug messages about venv_path.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nusiq committed Aug 30, 2021
1 parent ba2bb46 commit 587c3b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type Profile struct {
Unsafe bool `json:"unsafe"`
Filters []Filter `json:"filters"`
ExportTarget ExportTarget `json:"export"`
VenvPath string `json:"venv_path"`
VenvPath string `json:"venvPath"`
}

type Filter struct {
Expand Down
5 changes: 1 addition & 4 deletions src/python_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,16 @@ func resolveVenvPath(profile Profile, filterPath string) string {
if err != nil {
Logger.Fatal("Unable to resolve filter path: ", filterPath)
}
Logger.Debug("Using default venv_path: ", resolvedPath)
} else if filepath.IsAbs(profile.VenvPath) {
// path is absolute (don't change)
Logger.Debug("Using absolute venv_path: ", profile.VenvPath)
return profile.VenvPath
} else {
// non-absolute path put it into .regolith/venvs
resolvedPath, err = filepath.Abs(
path.Join(".regolith/venvs", profile.VenvPath))
if err != nil {
Logger.Fatal("Unable to resolve venv_path: ", profile.VenvPath)
Logger.Fatal("Unable to resolve venvPath: ", profile.VenvPath)
}
Logger.Debug("Using resolved venv_path: ", profile.VenvPath)
}
return resolvedPath
}
Expand Down

0 comments on commit 587c3b6

Please sign in to comment.