Azure / nxtools

Azure Automanage Machine Configuration Linux DSC resources
Other
13 stars 13 forks source link

nxPackage: Fix Set-operation hanging for apt-packages #20

Closed janegilring closed 1 year ago

janegilring commented 1 year ago

Pull Request (PR) description

This PR adds a -Force parameter to Install-nxAptPackage and Install-nxPackage to make it possible to supply the confirmation parameter --yes to apt install when using the commands interactively. It also adds Force = $true in the nxPackage resource in order to suppress the confirmation promt in unattended DSC invocations.

This Pull Request (PR) fixes the following issues

Task list

gaelcolas commented 1 year ago

Looks good to me, although in the current state, iirc, if Force is not set it would just hang. Is there a --no we could default to to fail the operation?

janegilring commented 1 year ago

Looks good to me, although in the current state, iirc, if Force is not set it would just hang. Is there a --no we could default to to fail the operation?

Good question. It seems like there are no --no parameter, but maybe it could be better to default to --simulate if -Force is not set to $true?

Ref: https://linuxcommandlibrary.com/man/apt-get