gpt4 book ai didi

chocolatey - 您如何检索 Chocolatey 安装参数?

转载 作者:行者123 更新时间:2023-12-04 01:44:22 31 4
gpt4 key购买 nike

您如何检索 Chocolatey 安装参数?我知道如何获取参数:$pp = Get-PackageParameters但不安装args。
具体我想看看--forceX86--x86标志已设置。

最佳答案

来自 Kim J. Nordmo @AdmiringWorm 的回答|在 Chocolatey Gitter channel 。

@dhoer as far as I know, there isn't a way to retrieve all the arguments, just the arguments passed with --package-args.

However, if the only thing you need is to detect if the user tries to force --x86, then you can check if the following environment variable $env:chocolateyForceX86 is equal to $true


例子
if ((Get-ProcessorBits 32) -or $env:ChocolateyForceX86 -eq $true) {}

关于chocolatey - 您如何检索 Chocolatey 安装参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45907503/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com