From 2b2a21d96ec12c2e0eae2066fd677af0417405e2 Mon Sep 17 00:00:00 2001 From: Mateus Melchiades Date: Mon, 31 Jul 2023 19:09:35 -0300 Subject: [PATCH] core: Fix "&&" order in dpks-buildpackage --- core/dpkg-buildpackage.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/dpkg-buildpackage.go b/core/dpkg-buildpackage.go index 2b05989..1c2b564 100644 --- a/core/dpkg-buildpackage.go +++ b/core/dpkg-buildpackage.go @@ -10,12 +10,8 @@ func BuildDpkgBuildPkgModule(module Module) (string, error) { module.Name, ) - for i, path := range module.Source.Paths { - cmd += fmt.Sprintf(" dpkg -i ../%s*.deb && apt install -f", path) - - if i != len(module.Source.Paths)-1 { - cmd += " && " - } + for _, path := range module.Source.Paths { + cmd += fmt.Sprintf(" && dpkg -i ../%s*.deb && apt install -f", path) } cmd += " && apt clean"