Я пытаюсь убрать многословие из команды choco install
в AppVeyor. Вот что я пытался (как предложено здесь):
if (Test-Path "C:/ProgramData/chocolatey/bin/swig.exe") {
echo "using swig from cache"
} else {
choco install swig > NUL
}
Однако это не удается с:
Redirection to 'NUL' failed: FileStream will not open Win32 devices such as
disk partitions and tape drives. Avoid use of "\\.\" in the path.
At line:4 char:5
+ choco install swig > NUL
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : RedirectionFailed
Command executed with exception: Redirection to 'NUL' failed: FileStream will not open Win32 devices such as disk partitions and tape drives. Avoid use of "\\.\" in the path.
Итак, мой вопрос: есть ли способ подавить многословность команды choco install
в PowerShell на AppVeyor?
-y
к аргументу, так как он может не завершить установку в зависимости от версии choco. - person ferventcoder   schedule 31.12.2015