How do I update all Chocolatey applications without confirmation?

后端 未结 2 1801
耶瑟儿~
耶瑟儿~ 2020-12-23 15:46

I used to be able to call cup all and have my applications update. Now, it asks for yes to ensure that I want to install the selected package. Is t

2条回答
  •  旧巷少年郎
    2020-12-23 16:38

    As Rob points out, -y will skip the prompts for a given command.

    If you'd rather not be bothered with confirmation prompts at all, you can set the option globally.

    The following enables allowGlobalConfirmation, which will install or update without confirmation prompts.

    choco feature enable -n=allowGlobalConfirmation
    

    If you ever want to turn the prompts back on, run the same command with disable:

    choco feature disable -n=allowGlobalConfirmation
    

    This can be useful for unattended scripts without affecting the future state of the prompts.

    NOTE: The syntax has recently changed (July 2016) and now requires an equals sign before allowGlobalConfirmation instead of a dash. Thanks for the heads up, @dragon788.

提交回复
热议问题