@@ -73,7 +73,9 @@ func (d *Deb) Install(artifactsPath string) error {
7373 d .PKGBUILD .PkgName , d .PKGBUILD .PkgVer , d .PKGBUILD .PkgRel ,
7474 d .PKGBUILD .ArchComputed ))
7575
76- if err := utils .Exec (false , "" , "apt-get" , "install" , "-y" , artifactFilePath ); err != nil {
76+ args := append (installArgs , artifactFilePath )
77+
78+ if err := utils .Exec (false , "" , "apt-get" , args ... ); err != nil {
7779 return err
7880 }
7981
@@ -85,25 +87,15 @@ func (d *Deb) Install(artifactsPath string) error {
8587// makeDepends: a slice of strings representing the dependencies to be installed.
8688// Returns an error if there was a problem installing the dependencies.
8789func (d * Deb ) Prepare (makeDepends []string ) error {
88- args := []string {
89- "--allow-downgrades" ,
90- "--assume-yes" ,
91- "install" ,
92- }
93-
94- return d .PKGBUILD .GetDepends ("apt-get" , args , makeDepends )
90+ return d .PKGBUILD .GetDepends ("apt-get" , installArgs , makeDepends )
9591}
9692
9793// PrepareEnvironment prepares the environment for the Deb package.
9894//
9995// It takes a boolean parameter `golang` which indicates whether or not to set up Go.
10096// It returns an error if there was a problem during the environment preparation.
10197func (d * Deb ) PrepareEnvironment (golang bool ) error {
102- args := []string {
103- "--assume-yes" ,
104- "install" ,
105- }
106- args = append (args , buildEnvironmentDeps ... )
98+ args := append (installArgs , buildEnvironmentDeps ... )
10799
108100 if err := utils .Exec (false , "" , "apt-get" , args ... ); err != nil {
109101 return err
0 commit comments