Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid command line argument: -–import #11126

Closed
1 of 2 tasks
johnwspirent opened this issue Feb 5, 2024 · 2 comments
Closed
1 of 2 tasks

Invalid command line argument: -–import #11126

johnwspirent opened this issue Feb 5, 2024 · 2 comments

Comments

@johnwspirent
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3085]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

n/a

Other Software

none

Repro Steps

I am trying to import a .tar based on Debian. The "--import" doesn't work at all for me, although it does for a colleague. Entering "wsl --import" with or without additional arguments returns "Invalid command line argument: -–import" error.

Expected Behavior

Enter "wsl -–import" in a PowerShell with admin rights. I would expect to see the "--help" text because the command arguments are missing.

Enter "wsl --import" with correct arguments and I would expect the .tar file to be import.

Enter "wsl --help" and I would to see help text.

Actual Behavior

I see an "Invalid command line argument" error for import:

PS C:\svn\wsl_images> wsl -–import
Invalid command line argument: -–import
Please use 'wsl.exe --help' to get a list of supported arguments.

"wsl --help" is working for me now, but even this stopped working for some time. I have no idea why it stopped working or why it started working again:

PS C:\svn\wsl_images> wsl -–help
Invalid command line argument: -–help
Please use 'wsl.exe --help' to get a list of supported arguments.

Diagnostic Logs

No response

@0xbadfca11
Copy link

You are mixing a hyphen(-) and an EN DASH(–).

@johnwspirent
Copy link
Author

johnwspirent commented Feb 6, 2024

Many thanks, that was the issue. In my defence PowerShell displays the two hyphen characters identically. I had cut and pasted the text into PowerShell and from then on command recall made the issue persistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants