Skip to content

Commit

Permalink
Improve repositores code
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Nov 7, 2024
1 parent 5e1e139 commit 9dda5e4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,17 +961,17 @@ func pythonCmd(c *cli.Context, projectType project.ProjectType) error {
cmdName, filteredArgs := getCommandName(orgArgs)
switch projectType {
case project.Pip:
pythonCommand := python.NewPipCommand()
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pythonCommand)
pipCommand := python.NewPipCommand()
pipCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pipCommand)
case project.Pipenv:
pythonCommand := python.NewPipenvCommand()
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pythonCommand)
pipenvCommand := python.NewPipenvCommand()
pipenvCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pipenvCommand)
case project.Poetry:
pythonCommand := python.NewPoetryCommand()
pythonCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(pythonCommand)
poetryCommand := python.NewPoetryCommand()
poetryCommand.SetServerDetails(rtDetails).SetRepo(pythonConfig.TargetRepo()).SetCommandName(cmdName).SetArgs(filteredArgs)
return commands.Exec(poetryCommand)
default:
return errorutils.CheckErrorf("%s is not supported", projectType)
}
Expand Down

0 comments on commit 9dda5e4

Please sign in to comment.