We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e6096d commit f708e00Copy full SHA for f708e00
win_install.ps1
@@ -1,14 +1,12 @@
1
-param(
2
- [string]$Version
3
-)
+$Version = $args[0]
+
+if (-not $Version) {
4
+ throw "Usage: iex <script> v0.2.0"
5
+}
6
7
function Install-AppStreamFile {
8
param([string]$Version)
9
- if (-not $Version) {
- throw "Usage: iwr ... | iex -Version v0.2.0"
10
- }
11
-
12
$repo = "aslamcodes/appstreamfile"
13
$baseUrl = "https://github.com/$repo/releases/download/$Version"
14
$dir = "$env:TEMP\appstreamfile"
@@ -38,4 +36,4 @@ function Install-AppStreamFile {
38
36
& $exe --help
39
37
}
40
41
-Install-AppStreamFile -Version $Version
+Install-AppStreamFile $Version
0 commit comments