mirror of
https://github.com/danbulant/deno_install
synced 2026-06-19 22:41:55 +00:00
ps: Fix specifying version (#34)
This commit is contained in:
parent
7edda0f115
commit
e8a3ed1159
2 changed files with 5 additions and 6 deletions
|
|
@ -2,13 +2,12 @@
|
|||
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
||||
# TODO(everyone): Keep this script simple and easily auditable.
|
||||
|
||||
param (
|
||||
[ValidatePattern('^v(\d+).(\d+).(\d+)$')]
|
||||
[String] $Version
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if ($args.Length -gt 0) {
|
||||
$Version = $args.Get(0)
|
||||
}
|
||||
|
||||
if ($PSVersionTable.PSVersion.Major -lt 6) {
|
||||
$IsWindows = $true
|
||||
$IsMacOS = $false
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ if (!(Get-Module PSScriptAnalyzer -ListAvailable)) {
|
|||
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force
|
||||
}
|
||||
|
||||
Invoke-ScriptAnalyzer *.ps1 -Exclude PSAvoidAssignmentToAutomaticVariable
|
||||
Invoke-ScriptAnalyzer *.ps1 -EnableExit -Exclude PSAvoidAssignmentToAutomaticVariable
|
||||
|
||||
if ($PSVersionTable.PSVersion.Major -lt 6) {
|
||||
$IsWindows = $true
|
||||
|
|
|
|||
Loading…
Reference in a new issue