@@ -12,22 +12,22 @@ export function setupAptPack(name: string, version?: string, repository: boolean
12
12
let exit : number | null = 0
13
13
14
14
if ( typeof repository === "string" ) {
15
- exit = spawn . sync ( mightSudo ( "add-apt-repository" ) , [ "--update" , repository ] , { stdio : "inherit" } ) . status
15
+ exit = spawn . sync ( mightSudo ( "add-apt-repository" ) , [ "--update" , "-y" , repository ] , { stdio : "inherit" } ) . status
16
16
}
17
17
18
18
if ( ! didUpdate || repository === true ) {
19
- exit = spawn . sync ( apt , [ "update" ] , { stdio : "inherit" } ) . status
19
+ exit = spawn . sync ( apt , [ "update" , "-y" ] , { stdio : "inherit" } ) . status
20
20
didUpdate = true
21
21
}
22
22
23
23
if ( version !== undefined && version !== "" ) {
24
24
try {
25
- exit = spawn . sync ( apt , [ "install" , `${ name } =${ version } ` ] , { stdio : "inherit" } ) . status
25
+ exit = spawn . sync ( apt , [ "install" , "-y" , `${ name } =${ version } ` ] , { stdio : "inherit" } ) . status
26
26
} catch {
27
- exit = spawn . sync ( apt , [ "install" , `${ name } -${ version } ` ] , { stdio : "inherit" } ) . status
27
+ exit = spawn . sync ( apt , [ "install" , "-y" , `${ name } -${ version } ` ] , { stdio : "inherit" } ) . status
28
28
}
29
29
} else {
30
- exit = spawn . sync ( apt , [ "install" , name ] , { stdio : "inherit" } ) . status
30
+ exit = spawn . sync ( apt , [ "install" , "-y" , name ] , { stdio : "inherit" } ) . status
31
31
}
32
32
33
33
if ( exit !== 0 && exit !== null ) {
0 commit comments