Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the expectation that porter would already be installed #3033

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ and we will add you. **All** contributors belong here. 💯
- [Ray Terrill](https://github.com/rayterrill)
- [Kim Christensen](https://github.com/kichristensen)
- [Shivam](https://github.com/Bharadwajshivam28)
- [David Gannon](https://github.com/dgannon991)
11 changes: 8 additions & 3 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,14 @@ func Install() {
// Removing the file first clears the cache so that we don't run into "zsh: killed porter..."
// See https://stackoverflow.com/questions/67378106/mac-m1-cping-binary-over-another-results-in-crash
// See https://openradar.appspot.com/FB8914231
mgx.Must(os.Remove(filepath.Join(porterHome, "porter"+xplat.FileExt())))
mgx.Must(os.RemoveAll(filepath.Join(porterHome, "runtimes")))
removeError := os.Remove(filepath.Join(porterHome, "porter"+xplat.FileExt()))
if !os.IsNotExist(removeError) {
mgx.Must(removeError)
}
removeError = os.RemoveAll(filepath.Join(porterHome, "runtimes"))
if !os.IsNotExist(removeError) {
mgx.Must(removeError)
}

// Okay now it's safe to copy these files over
mgx.Must(shx.Copy(filepath.Join("bin", "porter"+xplat.FileExt()), porterHome))
Expand Down Expand Up @@ -679,7 +685,6 @@ func Install() {
// Removing the file first clears the cache so that we don't run into "zsh: killed MIXIN..."
// See https://stackoverflow.com/questions/67378106/mac-m1-cping-binary-over-another-results-in-crash
// See https://openradar.appspot.com/FB8914231


// Copy the mixin client binary
mgx.Must(shx.Copy(filepath.Join(srcDir, mixin+xplat.FileExt()), destDir))
Expand Down
Loading