Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/installcmd/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ func resolveGGAInstall(profile system.PlatformProfile) (CommandSequence, error)
}, nil
case "apt", "pacman", "dnf":
const tmpDir = "/tmp/gentleman-guardian-angel"
_ = os.RemoveAll(tmpDir)
return CommandSequence{
{"rm", "-rf", tmpDir},
{"git", "clone", "https://github.com/Gentleman-Programming/gentleman-guardian-angel.git", tmpDir},
Expand All @@ -274,6 +275,7 @@ func resolveGGAInstall(profile system.PlatformProfile) (CommandSequence, error)
// PowerShell is used for cleanup to avoid cmd.exe quoting issues with
// embedded double quotes in the "if exist ... rmdir" approach.
cloneDst := filepath.Join(os.TempDir(), "gentleman-guardian-angel")
_ = os.RemoveAll(cloneDst)
bash := gitBashPath()
return CommandSequence{
{"powershell", "-NoProfile", "-Command", fmt.Sprintf("Remove-Item -Recurse -Force -ErrorAction SilentlyContinue '%s'; exit 0", cloneDst)},
Expand Down
Loading