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
AppVeyor の PowerShell 内でコマンドの冗長性を抑える方法はありますか?