Skip to content

Commit d5a8682

Browse files
authored
Update mips.ps1
1 parent 00d3813 commit d5a8682

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

mips.ps1

+2-5
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,7 @@ function Install($Version) {
196196
}
197197

198198
$dest = Get-AbsolutePath ([Environment]::GetFolderPath('ApplicationData') + "/mips")
199-
$me = $MyInvocation.Value.MyCommand
200-
if ($me -eq $NULL) {
201-
$me = $MyInvocation.InvocationName
202-
}
199+
$me = $MyInvocation.MyCommand.Path
203200

204201
$MipsBaseURL = "https://static.grumpycoder.net/pixel/mips/"
205202
$GdbBaseURL = "https://static.grumpycoder.net/pixel/gdb-multiarch-windows/"
@@ -213,7 +210,7 @@ $ErrorActionPreference = "stop"
213210

214211
# If we're invoked from the installer shortcut, we're going to redownload ourselves
215212
# and install ourselves. That's a bit redundant, but, sure.
216-
if ($me -eq "&") {
213+
if ($MyInvocation.InvocationName -eq "&") {
217214
$me = [System.IO.Path]::GetTempFileName()
218215
Invoke-WebRequest -Uri $MyURI -OutFile $me
219216
$cmd = "self-install"

0 commit comments

Comments
 (0)