Stop execution if tool version already installed (4/4) - #49
Draft
Tina Murimi (TinaMor) wants to merge 2 commits into
Draft
Stop execution if tool version already installed (4/4)#49Tina Murimi (TinaMor) wants to merge 2 commits into
Tina Murimi (TinaMor) wants to merge 2 commits into
Conversation
Tina Murimi (TinaMor)
force-pushed
the
tinamor/fix-reinstall
branch
4 times, most recently
from
February 5, 2025 10:30
ec09670 to
38108f6
Compare
Tina Murimi (TinaMor)
marked this pull request as ready for review
February 5, 2025 10:45
Billy Owire (billywr)
previously approved these changes
Feb 5, 2025
| $blktVersion = ($blktVersion.Split(' ')[2]).TrimStart('v') | ||
| Write-Debug "{ User Version: $userVersion, Current Version: $blktVersion }" | ||
| if ($userVersion -eq $blktVersion) { | ||
| Write-Warning "Installed Buildkit version is the same as the requested version. Please uninstall the existing version using 'Uninstall-Containerd' or use -Force to reinstall." |
There was a problem hiding this comment.
Messaging is inconsistent, Uninstall-Containerd in buildkit warning
|
|
||
| # Check if user wants to install an already installed version | ||
| Write-Debug "Containerd executable: $ctrexe" | ||
| $cmdOutput = Invoke-ExecutableCommand -Executable "$ctrexe" -Arguments "--version" |
There was a problem hiding this comment.
containerd, nerdctl and buildkit version checks look similar, perhaps break this logic out into utilities
Tina Murimi (TinaMor)
marked this pull request as draft
February 5, 2025 20:13
…pecified Make reinstall check reusable
Tina Murimi (TinaMor)
force-pushed
the
tinamor/fix-reinstall
branch
from
March 12, 2025 13:23
bbb8f1e to
2a29a08
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description
Background information
When the version of a tool is already installed, the
Install-Commanduninstalls then reinstalls the tool. To fix this, if the tool version is already installed, the script will stop execution and show the user a warning. If a user must reinstall it, they can pass-Forceflag when running the command.Github issue
#20
Testing information
Check installed buildkit version
Try to install an already installed version
Should show user a warning and stop installation
Force install an already installed version
Should show use a warning, proceed to uninstall the installed version, then re-install the version
Checklist
As part of our commitment to engineering excellence, before submitting this PR, please make sure:
In addition, after this PR has been reviewed, please agree to: