diff --git a/install.ps1 b/install.ps1 index dbc892c..c099224 100644 --- a/install.ps1 +++ b/install.ps1 @@ -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 diff --git a/install_test.ps1 b/install_test.ps1 index 520e345..053ba3c 100644 --- a/install_test.ps1 +++ b/install_test.ps1 @@ -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