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.
What this PR does / why we need it
When installing the latest CLI version v1.2.0-rc.0 using Chocolatey, there is an issue with the spinner when installing plugins. If Ctrl+C is pressed while the spinner is running, it does not properly handle the interrupt and terminate the spinner. Instead, the CLI hangs without returning an error.
The root cause is the Windows Chocolatey install wrapper or shim that gets created for the tanzu executable. This wrapper kills the CLI process on Ctrl+C without allowing the CLI to catch the interrupt itself. There is a long-standing open issue on this behavior: chocolatey/home#134
This PR fixes the issue by avoiding the Chocolatey-generated wrapper or shim for the tanzu executable. Instead, it directly uses the tanzu CLI release executable tanzu-cli-windows-*.exe or tanzu command, and updates the install script to ignore creating a wrapper.
Which issue(s) this PR fixes
Fixes #
Describe testing done for PR
2)Installation after the fix:
![image](https://private-user-images.githubusercontent.com/4702817/301892585-ee3d6564-e25b-499a-a0a4-0a19bdf0ec32.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTI1ODEsIm5iZiI6MTczOTE5MjI4MSwicGF0aCI6Ii80NzAyODE3LzMwMTg5MjU4NS1lZTNkNjU2NC1lMjViLTQ5OWEtYTBhNC0wYTE5YmRmMGVjMzIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTI1ODAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDRjNzk1NmIyOWM2ODZjODY2MWU2MDFjMzUyNGFkN2M2MzI2MGJjYjMwYjAxMzcyNTdiZjdiMjg4YWRkNjJkYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.cOywAjJNuWTH_f5B2AhfW_oZQSxrKed8CaLTyrcvedU)
After the above build, the files from the
tanzu-cli/hack/choco/_output/choco/
(chocolateyInstall.ps1 and tanzu-cli-unstable.1.2.0-rc0.nupkg
) copied to windows AMD system, then installed the choco package:choco install -s=/Users/chan/Downloads tanzu-cli-unstabl --pre --force
3)The spinner issue is tested in Power shell and Command prompt, its working fine:
![image](https://private-user-images.githubusercontent.com/4702817/301890939-37719df8-1bcb-45ef-945b-3e692cb424c5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTI1ODEsIm5iZiI6MTczOTE5MjI4MSwicGF0aCI6Ii80NzAyODE3LzMwMTg5MDkzOS0zNzcxOWRmOC0xYmNiLTQ1ZWYtOTQ1Yi0zZTY5MmNiNDI0YzUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTI1ODAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjBmNGQ3MzY0ZTdkZTM3NWE1NTUxZjA3NDFjNjhkNzg1NjllYmIzNWQyMmJkODQ1Y2YwYjAwODgxM2E2ZWJlZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.PTV0jClXiyEmP6Zl4fGKW6bsmX593og5FMY23JTDxLk)
![image](https://private-user-images.githubusercontent.com/4702817/301890974-906c120d-fc9e-46c7-b2a3-982f1e706da5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTI1ODEsIm5iZiI6MTczOTE5MjI4MSwicGF0aCI6Ii80NzAyODE3LzMwMTg5MDk3NC05MDZjMTIwZC1mYzllLTQ2YzctYjJhMy05ODJmMWU3MDZkYTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTI1ODAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjM0ZGU2MmQyOTlhZGJhMmZmMjJjNjIzZDA2ZWJmZjk1Y2RkMWExMjQ3MGI3NDgyNDQ0OGMyNTU1MWI1MjdmMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.yBHsR_aZn3N2_N7Olc2uxmuFFxJk2WURmIXFcrOU60E)
Release note
Additional information
Special notes for your reviewer