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
[Storage] Fix #27590: az storage fs directory download
: Check user sytem PATH for azcopy and use CLI config directory for new install
#27593
Conversation
🔄AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Storage |
Some more thoughts here. The desired behavior is for az CLI to use azcopy binary for some sub commands. The issue was that the az CLI command would download azcopy binary to an install location that is common for users to install software The proposed solution here is to use the azcopy binary that already exists if one can be found.. but that might not be ideal either because az CLI might depend on features of a specific azcopy version (right now it's pinned at 10.13, but the latest version is 10.21.0), causing more people to file issues about the az storage CLI.... A more stable solution that doesn't break the users local version of azcopy, or potentially break az cli commands by using an incompatible version of azcopy, would be to have a more unique default install location for the az cli's pinned version of azcopy. For example, suppose I have a local version of azcopy: |
@jakevc Having a pinned version in another location is probably a better solution than what I was trying to do here. Will keep the 10.13.0 as the version. |
…ll location for the pineed version azcopy used by cli
I do think what jake said is a good suggestion. Can we detect whether there's existing |
BTW, resource module installs bicep under our config directory, shall we follow the same path? azure-cli/src/azure-cli/azure/cli/command_modules/resource/_bicep.py Lines 41 to 42 in 3209b95
|
az storage fs directory download
: Check system path for azcopy before installingaz storage fs directory download
: Make a more unique directory for azcopy used by CLI
…er than 10.13.0, use the cli config dir following the same convention as bicep
…ed azcopy version
az storage fs directory download
: Make a more unique directory for azcopy used by CLIaz storage fs directory download
: Check user sytem PATH for azcopy, use CLI config directory for azcopy
az storage fs directory download
: Check user sytem PATH for azcopy, use CLI config directory for azcopyaz storage fs directory download
: Check user sytem PATH for azcopy and use CLI config directory for new install
Related command
Description
Fix #27590 Check user sytem PATH for azcopy and use it if the version is newer than 10.13.0. If not found or has old version, use CLI config directory for azcopy
Testing Guide
History Notes
[Storage] Fix #27590:
az storage fs directory download
: Check user sytem PATH for azcopy and use CLI config directory for new installThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.