microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.54k stars 823 forks source link

Allow ; (semicolon) in addition to working hash sign in /etc/wsl.conf #7013

Open gavenkoa opened 3 years ago

gavenkoa commented 3 years ago

I spent an hour trying to apply [automount] options reloading sc stop LxssManager and stopping distro wsl.exe --terminate Debian.

The mount -l showed default mount settings.

The problem was that I commented a line with semicolon:

[automount]
enabled = true
mountFsTab = false
; options = "metadata"
options = "metadata,noatime,uid=1000,gid=1000,umask=022,fmask=077"

because documentation said the file uses INI-like syntax:

Instead all examples use # as comment syntax and it was hard to get to the point not trusting comment syntax...

therealkenc commented 3 years ago

As a rider on this one (to the extent the parser gets touched), logging syntax errors in the .ini files to dmesg would go a long way. One could even argue for an error (or warning) to the console.