More fine grained error message when failing export command
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
When exporting a image to a file using `--export` and the target filename is a directory, wsl should emit an error indicating that the reason for failure was that a directory, rather than a file was specified. Currently it simply displays `Access is denied.` which leads to investigating permissions issues rather than correcting the parameter.
```
PS D:\wsl> wsl --export 'Ubuntu-18.04' D:\wsl
Access is denied.
PS D:\wsl> wsl --export 'Ubuntu-18.04' D:\wsl\ubuntu.tar
```
Contributor guide
Research direction
Reproduce the failure with `wsl --export 'Ubuntu-18.04' D:\wsl`, then trace the `--export` command's handling of its target path. Compare the directory case with the valid `D:\wsl\ubuntu.tar` case. Done means a directory target produces an error explaining that a directory was specified instead of a file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100