pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/MichaelCurrin/auto-commit-msg/commit/439851ce612ab02be0eb8334e00a3c095db9870e

ossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-a5d20170108e1057.css" /> update install_cli.ps1 · MichaelCurrin/auto-commit-msg@439851c · GitHub
Skip to content

Commit 439851c

Browse files
committed
update install_cli.ps1
1 parent 341af6d commit 439851c

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

bin/install_cli.ps1

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
$ErrorActionPreference = "Stop"
22

3-
# Configuration
43
$Repo = "MichaelCurrin/auto-commit-msg"
54
$Binaries = @("acm", "gacm", "auto_commit_msg")
65
$InstallDir = "$HOME\AppData\Local\bin"
76

8-
$ReleasesApiUrl = "https://api.github.com/repos/$Repo/releases"
9-
$LatestRelease = Invoke-RestMethod -Uri $ReleasesApiUrl -UseBasicParsing | Select-Object -First 1
10-
if (-not $LatestRelease -or -not $LatestRelease.tag_name) {
11-
throw "Could not determine latest release tag from $ReleasesApiUrl"
12-
}
13-
14-
$Tag = $LatestRelease.tag_name
15-
Write-Host "Found latest tag: '$Tag'."
16-
$RepoUrl = "https://github.com/$Repo/releases/download/$Tag"
7+
$RepoUrl = "https://github.com/$Repo/releases/latest/download"
178

18-
# Ensure install directory exists
9+
# Ensure install directory exists.
1910
if (!(Test-Path $InstallDir)) {
2011
New-Item -ItemType Directory -Path $InstallDir | Out-Null
2112
}
2213

23-
# Create a temporary workspace
14+
# Create a temporary workspace.
2415
$TempDir = Join-Path $env:TEMP ([Guid]::NewGuid().ToString())
2516
New-Item -ItemType Directory -Path $TempDir | Out-Null
2617

@@ -40,7 +31,7 @@ try {
4031
Move-Item -Path $TempPath -Destination $DestPath -Force
4132
}
4233

43-
# Verify PATH
34+
# Verify PATH.
4435
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
4536
if ($UserPath -notlike "*$InstallDir*") {
4637
Write-Host "Adding $InstallDir to User PATH..." -ForegroundColor Cyan
@@ -52,7 +43,7 @@ try {
5243
Write-Host "Please restart your terminal to refresh the PATH." -ForegroundColor Yellow
5344
}
5445
finally {
55-
# Cleanup
46+
# Cleanup.
5647
if (Test-Path $TempDir) {
5748
Remove-Item -Path $TempDir -Recurse -Force
5849
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy