Auto-update arcdata extension and update SQL MIAA create (#20045)

* Auto update arcdata

* Create SQL MIAA uses --use-k8s and --namespace now

Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
Candice Ye
2022-07-14 18:55:50 -07:00
committed by GitHub
parent d91a0c3fe4
commit ada87478a7
2 changed files with 7 additions and 8 deletions

View File

@@ -494,6 +494,7 @@ export async function findAzAndArc(): Promise<IAzTool> {
/**
* Find az by searching user's directories. If no az is found, this will error out and no arcdata is found.
* If az is found, check if arcdata extension exists on it and return true if so, false if not.
* Attempt to update arcdata extension.
* Return the AzTool whether or not an arcdata extension has been found.
*/
async function findSpecificAzAndArc(): Promise<IAzTool> {
@@ -508,6 +509,9 @@ async function findSpecificAzAndArc(): Promise<IAzTool> {
throw AzureCLIArcExtError;
}
// Quietly attempt to update the arcdata extension to the latest. If it is already the latest, then it will not update.
await executeCommand('az', ['extension', 'update', '--name', 'arcdata']);
return new AzTool(path, <string>parseVersion(versionOutput.stdout), <string>arcVersion);
}