Skip to content

Commit

Permalink
Replace poetry update with poetry install
Browse files Browse the repository at this point in the history
`poetry update` is a command that upgrades all dependecies to their
latest compatible version. This is never what you want when just
installing dependencies. Instead, `poetry install` should be run to
install the dependency versions specified in the lock file.

This fixes the behavior of Frogbot upgrading all dependencies when
called in CI.
  • Loading branch information
BartSchuurmans committed Aug 14, 2024
1 parent 9f16036 commit e116245
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions utils/python/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ func ConfigPoetryRepo(url, username, password, configRepoName string) error {
if err = addRepoToPyprojectFile(filepath.Join(currentDir, pyproject), configRepoName, url); err != nil {
return err
}
return poetryUpdate()
return poetryInstall()
}

func poetryUpdate() (err error) {
log.Info("Running Poetry update")
cmd := io.NewCommand("poetry", "update", []string{})
func poetryInstall() (err error) {
log.Info("Running Poetry install")
cmd := io.NewCommand("poetry", "install", []string{})
err = gofrogcmd.RunCmd(cmd)
if err != nil {
return errorutils.CheckErrorf("Poetry config command failed with: %s", err.Error())
return errorutils.CheckErrorf("Poetry install command failed with: %s", err.Error())
}
return
}
Expand Down

0 comments on commit e116245

Please sign in to comment.