Azure / Azure/azure-cli

Error when trying command az account set --subscription

Open
#31,833 3 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
Auto-Resolve Azure CLI Team question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Error when trying command az account set --subscription

### Related command

az account set --subscription 1590d7ff-d68f-4465-bd63-00c2d7732581 && az aks get-credentials --resource-group cibtcoex-weu-dev-app-aks-rg --name cibtcoex-weu-dev-app-aks --overwrite-existing && kubelogin convert-kubeconfig -l azurecli && alias kc="kubectl -n cibtw2"

### Errors

En línea: 1 Carácter: 68
+ ... nt set --subscription 1590d7ff-d68f-4465-bd63-00c2d7732581 && az aks ...
+ ~~
El token '&&' no es un separador de instrucciones válido en esta versión.
En línea: 1 Carácter: 192
+ ... ks-rg --name cibtcoex-weu-dev-app-aks --overwrite-existing && kubelog ...
+ ~~
El token '&&' no es un separador de instrucciones válido en esta versión.
En línea: 1 Carácter: 236
+ ... write-existing && kubelogin convert-kubeconfig -l azurecli && alias k ...
+ ~~
El token '&&' no es un separador de instrucciones válido en esta versión.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine

### Issue script & Debug output

En línea: 1 Carácter: 68
+ ... nt set --subscription 1590d7ff-d68f-4465-bd63-00c2d7732581 && az aks ...
+ ~~
El token '&&' no es un separador de instrucciones válido en esta versión.
En línea: 1 Carácter: 192
+ ... ks-rg --name cibtcoex-weu-dev-app-aks --overwrite-existing && kubelog ...
+ ~~
El token '&&' no es un separador de instrucciones válido en esta versión.
En línea: 1 Carácter: 236
+ ... write-existing && kubelogin convert-kubeconfig -l azurecli && alias k ...
+ ~~
El token '&&' no es un separador de instrucciones válido en esta versión.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine

### Expected behavior

Connected to pod.
Be able to execute commands :

kc get pods
kc get pods --field-selector=status.phase==Running | grep "1/1"
kc logs nombre_de_pod
kc logs nombre_de_pod -f
kc get deployments

### Environment Summary

azure-cli 2.71.0 *

core 2.71.0 *
telemetry 1.1.0

Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\0021488\.azure'
Extensions directory 'C:\Users\0021488\.azure\cliextensions'

Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

### Additional context

Nothing else

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.