VERSION { version-script-commands }

本文档提供了一个详细的指南,关于如何理解和使用链接器的不同版本。它涵盖了版本之间的差异、如何选择合适的版本以及如何利用新特性等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://sourceware.org/binutils/docs/ld/VERSION.html
那你继续加油吧 你看看我是选Y还是关掉窗口重新开始 还是怎么办?PS C:\Users\Administrator> function Set-CurlVersion { >> [CmdletBinding()] >> param( >> [Parameter(Mandatory=$true)] >> [ValidateSet("custom", "system")] >> [string]$Version >> ) >> >> $platform = Get-Platform >> $currentPath = $env:Path -split [System.IO.Path]::PathSeparator >> >> # 创建系统路径变量 >> $systemPath = if ($platform -eq "Windows") { >> Join-Path -Path $env:SystemRoot -ChildPath "System32" >> } else { >> $null >> } >> >> switch ($Version) { >> "custom" { >> # 添加自定义路径到临时环境变量 >> $newPath = @($script:CurlPath) >> $newPath += $currentPath | Where-Object { >> $_ -ne $systemPath -and >> $_ -ne "/usr/bin" -and >> $_ -ne "/usr/local/bin" >> } >> } >> "system" { >> # 恢复原始环境变量 >> $newPath = $currentPath | Where-Object { $_ -ne $script:CurlPath } >> } >> } >> >> # 更新环境变量 >> $env:Path = $newPath -join [System.IO.Path]::PathSeparator >> Write-Host "已切换到 curl $Version 版本" -ForegroundColor Green >> } >> PS C:\Users\Administrator> # 创建模块目录 >> $moduleDir = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules\CurlTools" >> New-Item -ItemType Directory -Path $moduleDir -Force | Out-Null >> >> # 创建模块文件 >> $modulePath = Join-Path $moduleDir "CurlTools.psm1" >> PS C:\Users\Administrator> $manifestContent = @' >> @{ >> ModuleVersion = '1.0.0' >> RootModule = 'CurlTools.psm1' >> Author = 'Your Name' >> Description = '高级curl工具集模块' >> FunctionsToExport = @( >> 'Get-CurlVersion', >> 'Set-CurlVersion', >> 'Invoke-SecureDownload', >> 'Get-FileHashFromUrl', >> 'Update-CurlToolsModule' >> ) >> CompatiblePSEditions = @('Desktop', 'Core') >> PowerShellVersion = '5.1' >> } >> '@ >> >> Set-Content -Path (Join-Path $moduleDir "CurlTools.psd1") -Value $manifestContent >> PS C:\Users\Administrator> # 完整的模块内容(已修复所有错误) >> $moduleContent = @' >> # CurlTools.psm1 >> # ============== >> # 模块主文件 >> >> # 初始化模块变量 >> $script:Config = $null >> $script:CurlPath = $null >> $script:ConfigDir = $null >> $script:ConfigPath = $null >> >> # 检测操作系统 >> function Get-Platform { >> if ($PSVersionTable.PSEdition -eq "Core") { >> if ($IsWindows) { return "Windows" } >> elseif ($IsLinux) { return "Linux" } >> elseif ($IsMacOS) { return "macOS" } >> } else { >> return "Windows" >> } >> } >> >> # 获取跨平台配置目录 >> function Get-ConfigDir { >> $platform = Get-Platform >> switch ($platform) { >> "Linux" { >> if (-not (Test-Path "$env:HOME/.config")) { >> New-Item -ItemType Directory -Path "$env:HOME/.config" -Force | Out-Null >> } >> return "$env:HOME/.config/curltools" >> } >> "macOS" { >> if (-not (Test-Path "$env:HOME/Library/Application Support")) { >> New-Item -ItemType Directory -Path "$env:HOME/Library/Application Support" -Force | Out-Null >> } >> return "$env:HOME/Library/Application Support/CurlTools" >> } >> default { >> if (-not (Test-Path $env:APPDATA)) { >> New-Item -ItemType Directory -Path $env:APPDATA -Force | Out-Null >> } >> return "$env:APPDATA\CurlTools" >> } >> } >> } >> >> # 获取跨平台curl路径 >> function Get-DefaultCurlPath { >> $platform = Get-Platform >> switch ($platform) { >> "Linux" { return "/usr/bin" } >> "macOS" { return "/usr/local/bin" } >> default { >> # 尝试自动检测Windows上的curl路径 >> $potentialPaths = @( >> "C:\Program Files\curl\bin", >> "C:\curl\bin", >> "$env:USERPROFILE\curl\bin", >> "E:\curl-8.15.0_4-win64-mingw\bin" >> ) >> >> foreach ($path in $potentialPaths) { >> $curlExe = Join-Path $path "curl.exe" >> if (Test-Path $curlExe -PathType Leaf) { >> return $path >> } >> } >> >> # 使用默认路径 >> return "E:\curl-8.15.0_4-win64-mingw\bin" >> } >> } >> } >> >> # 初始化模块配置 >> function Initialize-ModuleConfig { >> $script:ConfigDir = Get-ConfigDir >> >> # 确保配置目录存在 >> if (-not (Test-Path $script:ConfigDir)) { >> New-Item -ItemType Directory -Path $script:ConfigDir -Force | Out-Null >> } >> >> $script:ConfigPath = Join-Path -Path $script:ConfigDir -ChildPath "config.json" >> >> # 加载或创建默认配置 >> if (Test-Path $script:ConfigPath) { >> try { >> $script:Config = Get-Content $script:ConfigPath | ConvertFrom-Json >> } catch { >> Write-Warning "配置加载失败: $_,创建新配置" >> $script:Config = $null >> } >> } >> >> if (-not $script:Config) { >> $script:Config = [PSCustomObject]@{ >> CurlPath = Get-DefaultCurlPath >> LastUpdate = (Get-Date).ToString("o") >> AutoUpdate = $true >> } >> $script:Config | ConvertTo-Json | Set-Content $script:ConfigPath -Force >> } >> >> # 设置模块路径 >> $script:CurlPath = $script:Config.CurlPath >> } >> >> # 保存配置 >> function Save-ModuleConfig { >> $script:Config | ConvertTo-Json | Set-Content $script:ConfigPath -Force >> } >> >> # 在模块导入时自动初始化配置 >> Initialize-ModuleConfig >> >> # 获取文件哈希 >> function Get-FileHashFromUrl { >> <# >> .SYNOPSIS >> 从URL获取文件的哈希值 >> >> .DESCRIPTION >> 下载文件到临时位置并计算其哈希值 >> >> .PARAMETER Url >> 要下载的文件URL >> >> .PARAMETER Algorithm >> 哈希算法 (SHA256, SHA1, MD5等) >> >> .EXAMPLE >> Get-FileHashFromUrl -Url "https://example.com/file.zip" -Algorithm SHA256 >> #> >> param( >> [Parameter(Mandatory=$true)] >> [string]$Url, >> >> [ValidateSet("SHA1", "SHA256", "SHA384", "SHA512", "MD5")] >> [string]$Algorithm = "SHA256" >> ) >> >> $tempFile = [System.IO.Path]::GetTempFileName() >> try { >> Write-Verbose "下载文件以计算哈希: $Url" >> $curlPath = Join-Path $script:CurlPath "curl.exe" >> & $curlPath -L -s -o $tempFile $Url >> >> if (-not (Test-Path $tempFile -PathType Leaf)) { >> throw "文件下载失败" >> } >> >> $hash = (Get-FileHash -Path $tempFile -Algorithm $Algorithm).Hash >> Write-Verbose "$Algorithm 哈希值: $hash" >> return $hash >> } catch { >> Write-Error "获取文件哈希失败: $_" >> return $null >> } finally { >> Remove-Item $tempFile -Force -ErrorAction SilentlyContinue >> } >> } >> >> # 获取curl版本信息 >> function Get-CurlVersion { >> <# >> .SYNOPSIS >> 获取已安装和最新的curl版本信息 >> >> .DESCRIPTION >> 返回包含已安装版本、最新版本和更新命令的对象 >> >> .EXAMPLE >> Get-CurlVersion >> #> >> # 获取已安装版本 >> try { >> $curlPath = Join-Path $script:CurlPath "curl.exe" >> $versionOutput = & $curlPath --version 2>&1 | Out-String >> if (-not ($versionOutput -match 'curl (\d+\.\d+\.\d+)')) { >> throw "无法解析 curl 版本信息" >> } >> $installedVersion = $Matches[1] >> } catch { >> Write-Warning "获取已安装版本失败: $_" >> $installedVersion = "0.0.0" >> } >> >> # 获取最新版本 >> try { >> $latestVersion = $null >> >> # 方案1: 使用官方下载页面解析 >> try { >> $curlPath = Join-Path $script:CurlPath "curl.exe" >> $releasePage = & $curlPath -s -L https://curl.se/download.html >> if ($releasePage -match 'curl (\d+\.\d+\.\d+)</a> is the latest') { >> $latestVersion = $Matches[1] >> } >> } catch { >> Write-Verbose "官方下载页面解析失败: $_" >> } >> >> # 方案2: 使用 GitHub API >> if (-not $latestVersion) { >> try { >> $headers = @{ >> "User-Agent" = "PowerShell-CurlTools" >> "Accept" = "application/vnd.github.v3+json" >> } >> $curlPath = Join-Path $script:CurlPath "curl.exe" >> $releaseInfo = & $curlPath -s -L -H $headers https://api.github.com/repos/curl/curl/releases/latest >> $json = $releaseInfo | ConvertFrom-Json >> $latestVersion = $json.tag_name -replace 'curl-', '' -replace '_', '.' >> } catch { >> Write-Verbose "GitHub API 请求失败: $_" >> } >> } >> >> # 方案3: 从curl.haxx.se获取版本 >> if (-not $latestVersion) { >> try { >> $curlPath = Join-PPath $script:CurlPath "curl.exe" >> $versionPage = & $curlPath -s -L https://curl.haxx.se/info >> if ($versionPage -match 'curl (\d+\.\d+\.\d+)') { >> $latestVersion = $Matches[1] >> } >> } catch { >> Write-Verbose "curl.haxx.se 请求失败: $_" >> } >> } >> >> if (-not $latestVersion) { >> throw "无法获取最新版本" >> } >> } catch { >> Write-Warning "获取最新版本失败: $_" >> $latestVersion = $installedVersion >> } >> >> return [PSCustomObject]@{ >> Installed = $installedVersion >> Latest = $latestVersion >> UpdateCmd = "winget install curl.curl" >> } >> } >> >> # 切换curl版本 >> function Set-CurlVersion { >> <# >> .SYNOPSIS >> 切换使用的curl版本 >> >> .DESCRIPTION >> 在自定义版本和系统版本之间切换 >> >> .PARAMETER Version >> 要切换的版本 (custom 或 system) >> >> .EXAMPLE >> Set-CurlVersion -Version custom >> #> >> [CmdletBinding()] >> param( >> [Parameter(Mandatory=$true)] >> [ValidateSet("custom", "system")] >> [string]$Version >> ) >> >> $platform = Get-Platform >> $currentPath = $env:Path -split [System.IO.Path]::PathSeparator >> >> # 创建系统路径变量 >> $systemPath = if ($platform -eq "Windows") { >> Join-Path -Path $env:SystemRoot -ChildPath "System32" >> } else { >> $null >> } >> >> switch ($Version) { >> "custom" { >> # 添加自定义路径到临时环境变量 >> $newPath = @($script:CurlPath) >> $newPath += $currentPath | Where-Object { >> $_ -ne $systemPath -and >> $_ -ne "/usr/bin" -and >> $_ -ne "/usr/local/bin" >> } >> } >> "system" { >> # 恢复原始环境变量 >> $newPath = $currentPath | Where-Object { $_ -ne $script:CurlPath } >> } >> } >> >> # 更新环境变量 >> $env:Path = $newPath -join [System.IO.Path]::PathSeparator >> Write-Host "已切换到 curl $Version 版本" -ForegroundColor Green >> } >> >> # 安全下载文件 >> function Invoke-SecureDownload { >> <# >> .SYNOPSIS >> 安全下载文件并验证哈希值 >> >> .DESCRIPTION >> 下载文件并验证其哈希值以确保完整性 >> >> .PARAMETER Url >> 要下载的文件URL >> >> .PARAMETER ExpectedHash >> 期望的哈希值(可选) >> >> .PARAMETER Algorithm >> 哈希算法 (默认: SHA256) >> >> .PARAMETER OutputPath >> 输出文件路径 >> >> .PARAMETER AutoVerify >> 自动从源获取哈希值 >> >> .EXAMPLE >> Invoke-SecureDownload -Url "https://example.com/file.zip" -AutoVerify >> #> >> [CmdletBinding()] >> param( >> [Parameter(Mandatory=$true)] >> [string]$Url, >> >> [string]$ExpectedHash, >> >> [ValidateSet("SHA1", "SHA256", "SHA384", "SHA512", "MD5")] >> [string]$Algorithm = "SHA256", >> >> [string]$OutputPath = (Split-Path -Leaf $Url), >> >> [switch]$AutoVerify >> ) >> >> try { >> # 创建下载目录 >> $downloadDir = Split-Path -Path $OutputPath -Parent >> if (-not [string]::IsNullOrEmpty($downloadDir) -and -not (Test-Path $downloadDir)) { >> New-Item -ItemType Directory -Path $downloadDir -Force | Out-Null >> } >> >> # 下载文件 >> Write-Host "下载文件: $Url" -ForegroundColor Cyan >> $curlPath = Join-Path $script:CurlPath "curl.exe" >> & $curlPath -L -o $OutputPath -C - $Url >> >> # 自动获取哈希值(如果需要) >> if ($AutoVerify -or (-not $ExpectedHash)) { >> $ExpectedHash = Get-FileHashFromUrl -Url $Url -Algorithm $Algorithm >> if (-not $ExpectedHash) { >> throw "无法获取远程文件的$Algorithm哈希值" >> } >> Write-Host "自动获取哈希值: $ExpectedHash" -ForegroundColor Yellow >> } >> >> # 验证哈希 >> $actualHash = (Get-FileHash -Path $OutputPath -Algorithm $Algorithm).Hash >> >> if ($actualHash -ne $ExpectedHash) { >> Remove-Item $OutputPath -Force >> throw "文件哈希验证失败! 期望: $ExpectedHash, 实际: $actualHash" >> } >> >> Write-Host "✅ 文件验证成功: $OutputPath" -ForegroundColor Green >> return $OutputPath >> } catch { >> Write-Error "下载失败: $_" >> return $null >> } >> } >> >> # 模块更新函数 >> function Update-CurlToolsModule { >> <# >> .SYNOPSIS >> 更新CurlTools模块到最新版本 >> >> .DESCRIPTION >> 从GitHub仓库下载最新版本的模块文件 >> >> .EXAMPLE >> Update-CurlToolsModule >> #> >> try { >> $updateUrl = "https://raw.githubusercontent.com/yourname/curltools/main/CurlTools.psm1" >> >> # 获取模块路径 >> $moduleDir = if ($PSVersionTable.PSEdition -eq "Core") { >> "$env:USERPROFILE\Documents\PowerShell\Modules\CurlTools" >> } else { >> "$env:USERPROFILE\Documents\WindowsPowerShell\Modules\CurlTools" >> } >> >> $modulePath = Join-Path -Path $moduleDir -ChildPath "CurlTools.psm1" >> >> # 创建备份 >> $backupPath = "$modulePath.bak" >> if (Test-Path $modulePath) { >> Copy-Item -Path $modulePath -Destination $backupPath -Force >> } >> >> # 下载更新 >> Write-Host "下载模块更新..." -ForegroundColor Cyan >> $curlPath = Join-Path $script:CurlPath "curl.exe" >> & $curlPath -L -o $modulePath $updateUrl >> >> # 重新加载模块 >> Remove-Module CurlTools -ErrorAction SilentlyContinue >> Import-Module $modulePath -Force >> >> # 更新配置 >> $script:Config.LastUpdate = (Get-Date).ToString("o") >> Save-ModuleConfig >> >> Write-Host "✅ 模块已成功更新至最新版本" -ForegroundColor Green >> return $true >> } catch { >> # 恢复备份 >> if (Test-Path $backupPath) { >> Copy-Item -Path $backupPath -Destination $modulePath -Force >> Remove-Item $backupPath -Force >> } >> >> Write-Error "模块更新失败: $_" >> return $false >> } >> } >> >> # 导出模块成员 >> Export-ModuleMember -Function Get-CurlVersion, Set-CurlVersion, Invoke-SecureDownload, Get-FileHashFromUrl, Update-CurlToolsModule >> '@ >> >> Set-Content -Path $modulePath -Value $moduleContent -Force >> PS C:\Users\Administrator> # 创建模块目录 >> $moduleDir = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules\CurlTools" >> New-Item -ItemType Directory -Path $moduleDir -Force >> >> # 创建模块清单 >> $manifestContent = @" >> @{ >> ModuleVersion = '1.0.0' >> RootModule = 'CurlTools.psm1' >> Author = 'Your Name' >> Description = '高级curl工具集模块' >> FunctionsToExport = @( >> 'Get-CurlVersion', >> 'Set-CurlVersion', >> 'Invoke-SecureDownload', >> 'Get-FileHashFromUrl', >> 'Update-CurlToolsModule' >> ) >> CompatiblePSEditions = @('Desktop', 'Core') >> PowerShellVersion = '5.1' >> } >> "@ >> Set-Content -Path "$moduleDir\CurlTools.psd1" -Value $manifestContent >> >> # 创建模块文件 >> $modulePath = "$moduleDir\CurlTools.psm1" >> # 使用上面完整的模块内容填充此文件 >> 目录: C:\Users\Administrator\Documents\WindowsPowerShell\Modules Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 2025/8/12 19:05 CurlTools PS C:\Users\Administrator> # 导入模块 >> Import-Module CurlTools -Force >> >> # 获取curl版本信息 >> $versionInfo = Get-CurlVersion >> Write-Host "当前版本: $($versionInfo.Installed)" >> Write-Host "最新版本: $($versionInfo.Latest)" >> >> # 安全下载文件(自动验证哈希) >> $downloadedFile = Invoke-SecureDownload -Url "https://example.com/file.zip" -AutoVerify >> >> # 切换curl版本 >> Set-CurlVersion -Version custom >> >> # 更新模块 >> Update-CurlToolsModule >> 警告: 获取已安装版本失败: 无法将参数绑定到参数“Path”,因为该参数是空值。 警告: 获取最新版本失败: 无法获取最新版本 当前版本: 0.0.0 最新版本: 0.0.0 下载文件: https://example.com/file.zip Invoke-SecureDownload : 下载失败: 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 行:10 字符: 19 + ... oadedFile = Invoke-SecureDownload -Url "https://example.com/file.zip" ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-SecureDownload 已切换到 curl custom 版本 下载模块更新... Update-CurlToolsModule : 模块更新失败: 无法将参数绑定到参数“Path”,因为该参数是空值。 所在位置 行:16 字符: 1 + Update-CurlToolsModule + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Update-CurlToolsModule False PS C:\Users\Administrator> # 检查模块是否加载 >> Get-Module -Name CurlTools >> >> # 查看导出的函数 >> (Get-Module CurlTools).ExportedCommands.Keys >> >> # 查看模块路径 >> (Get-Module CurlTools).Path >> ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 1.0.0 CurlTools {Get-CurlVersion, Get-FileHashFromUrl, Invoke-SecureDownlo... Get-CurlVersion Get-FileHashFromUrl Invoke-SecureDownload Set-CurlVersion Update-CurlToolsModule C:\Users\Administrator\Documents\WindowsPowerShell\Modules\CurlTools\CurlTools.psm1 PS C:\Users\Administrator> # 设置调试模式 >> Set-PSDebug -Trace 2 >> >> # 运行函数 >> Get-CurlVersion >> >> # 关闭调试 >> Set-PSDebug -Off >> 调试: 5+ >>>> Get-CurlVersion 调试: 165+ function Get-CurlVersion >>>> { 调试: ! CALL function 'Get-CurlVersion' (defined in file 'C:\Users\Administrator\Documents\WindowsPowerShell\Modules\CurlTools\CurlTools.psm1') 调试: 178+ >>>> $curlPath = Join-Path $script:CurlPath "curl.exe" 调试: 185+ >>>> Write-Warning "获取已安装版本失败: $_" 警告: 获取已安装版本失败: 无法将参数绑定到参数“Path”,因为该参数是空值。 调试: 186+ >>>> $installedVersion = "0.0.0" 调试: ! SET $installedVersion = '0.0.0'. 调试: 191+ >>>> $latestVersion = $null 调试: ! SET $latestVersion = ''. 调试: 195+ >>>> $curlPath = Join-Path $script:CurlPath "curl.exe" 调试: 201+ >>>> Write-Verbose "官方下载页面解析失败: $_" 调试: 205+ if ( >>>> -not $latestVersion) { 调试: 207+ >>>> $headers = @{ 调试: ! SET $headers = 'System.Collections.Hashtable'. 调试: 211+ >>>> $curlPath = Join-Path $script:CurlPath "curl.exe" 调试: 216+ >>>> Write-Verbose "GitHub API 请求失败: $_" 调试: 221+ if ( >>>> -not $latestVersion) { 调试: 223+ >>>> $curlPath = Join-PPath $script:CurlPath "curl.exe" 调试: 229+ >>>> Write-Verbose "curl.haxx.se 请求失败: $_" 调试: 233+ if ( >>>> -not $latestVersion) { 调试: 234+ >>>> throw "无法获取最新版本" 调试: 237+ >>>> Write-Warning "获取最新版本失败: $_" 警告: 获取最新版本失败: 无法获取最新版本 调试: 238+ >>>> $latestVersion = $installedVersion 调试: ! SET $latestVersion = '0.0.0'. 调试: 241+ return >>>> [PSCustomObject]@{ 调试: 246+ >>>> } 调试: 8+ >>>> Set-PSDebug -Off Installed Latest UpdateCmd --------- ------ --------- 0.0.0 0.0.0 winget install curl.curl PS C:\Users\Administrator> # 在函数开头添加错误处理 >> function Get-CurlVersion { >> [CmdletBinding()] >> param() >> >> try { >> # 函数主体 >> } >> catch { >> Write-Error "Get-CurlVersion 失败: $_" >> Write-Error "详细信息: $($_.ScriptStackTrace)" >> return $null >> } >> } >> PS C:\Users\Administrator> # 创建自签名证书 >> $cert = New-SelfSignedCertificate -Type CodeSigning -Subject "CN=CurlTools" -KeyUsage DigitalSignature >> >> # 签名模块 >> Set-AuthenticodeSignature -FilePath $modulePath -Certificate $cert >> 目录: C:\Users\Administrator\Documents\WindowsPowerShell\Modules\CurlTools SignerCertificate Status Path ----------------- ------ ---- 96719E43A5BBD9F7A6394A6FE0A4686AEF7667FC UnknownError CurlTools.psm1 PS C:\Users\Administrator> # Tests/Get-CurlVersion.Tests.ps1 >> Describe "Get-CurlVersion" { >> It "返回有效的版本对象" { >> $result = Get-CurlVersion >> $result | Should -Not -Be $null >> $result.Installed | Should -Match '^\d+\.\d+\.\d+$' >> $result.Latest | Should -Match '^\d+\.\d+\.\d+$' >> } >> } >> Describing Get-CurlVersion [-] 返回有效的版本对象 180ms RuntimeException: '-Not' is not a valid Should operator. 在 Get-TestResult、C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\Assertions\Should.ps1 中: 第 42 行 在 Should<End>、C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\Assertions\Should.ps1 中: 第 83 行 在 <ScriptBlock>、<无文件> 中: 第 5 行 在 Invoke-Test、C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\It.ps1 中: 第 253 行 在 ItImpl、C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\It.ps1 中: 第 203 行 在 It、C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\It.ps1 中: 第 117 行 在 <ScriptBlock>、<无文件> 中: 第 3 行 在 Describe、C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\Functions\Describe.ps1 中: 第 100 行 在 <ScriptBlock>、<无文件> 中: 第 2 行 PS C:\Users\Administrator> # 安装 PlatyPS >> Install-Module -Name PlatyPS -Force >> >> # 生成帮助文档 >> New-MarkdownHelp -Module CurlTools -OutputFolder docs >> 需要使用 NuGet 提供程序来继续操作 PowerShellGet 需要使用 NuGet 提供程序“2.8.5.201”或更高版本来与基于 NuGet 的存储库交互。必须在“C:\Program Files\PackageManagement\ProviderAssemblies”或“C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssembli es”中提供 NuGet 提供程序。也可以通过运行 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force' 安装 NuGet 提供程序。是否要让 PowerShellGet 立即安装并导入 NuGet 提供程序? [Y] 是(Y) [N] 否(N) [S] 暂停(S) [?] 帮助 (默认值为“Y”):
最新发布
08-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值