Skip to content

WSL 2: wsl --shutdown accepts extra cmdline arguments #4539

@swarren

Description

@swarren

wsl --shutdown is the entire legal command according to wsl --help. However, if I actually type wsl --shutdown Ubuntu (i.e. when I get confused about which of --shutdown and --terminate is which), no error is issued. There should be an error, because Ubuntu is not an expected parameter to --shutdown.

Put another way. Actual behaviour:

c:\> wsl --shutdown foo
c:\> 

Expected behaviour:

c:\> wsl --shutdown foo
Error: Unknown argument "foo"
c:\> 

(No doubt this is happening because other cmdline options in wsl allow launching an arbitrary command within the WSL VM. However, --shutdown doesn't allow this, so shouldn't accept the meaningless/unused command argument.)

Windows build number: 10.0.18985.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions