Azure / Azure/azure-cli

Misleading error about WSLInterop

Open
#33,931 2 comments 1 reaction 3 assignees Claimed by @a0x1ab View on GitHub
Account act-identity-squad Auto-Assign Azure CLI Team bug customer-reported
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

WSL 2.0, Ubuntu 24.04
az CLI version: 2.89.1

az login command reported misleading error that WSL interopt is disabled but it finally redirects to external browser and works as expected

### Related command

az login

### Errors

grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
WSL Interopability is disabled. Please enable it before using WSL.
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
[error] WSL Interoperability is disabled. Please enable it before using WSL.

### Issue script & Debug output

On WSL interopt is enabled and working:
```
$cat /etc/wsl.conf
[interop]
enabled=true
appendWindowsPath=false

$echo $WSL_INTEROP
/run/WSL/725_interopls

$ls /proc/sys/fs/binfmt_misc
/proc/sys/fs/binfmt_misc/WSLInterop-late python3.12 register status

$cat /proc/sys/fs/binfmt_misc/WSLInterop-late
enabled
interpreter /init
flags: P
offset 0
magic 4d5a
```

### Expected behavior

az login should work without misleading error and correctly detect WSL interop

### Environment Summary

az cli: 2.89.1
WSL 2.0, Ubuntu 24.04

### Additional context

_No response_

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.