Skip to content

fix: clear error when wkg get output directory does not exist#207

Merged
lann merged 1 commit into
bytecodealliance:mainfrom
cargopete:fix/wkg-get-missing-output-dir
May 28, 2026
Merged

fix: clear error when wkg get output directory does not exist#207
lann merged 1 commit into
bytecodealliance:mainfrom
cargopete:fix/wkg-get-missing-output-dir

Conversation

@cargopete
Copy link
Copy Markdown
Contributor

Fixes #118.

When wkg get -o some_dir/ is used and some_dir doesn't exist, the previous error was:

Error: No such file or directory (os error 2) at path "/path/to/some_dir/.wkg-getT7LRZK"

The temp file name in the path sends the user in the wrong direction. The fix checks that parent_dir exists before attempting to create the temp file, and reports a clear error:

Error: output directory "/path/to/some_dir/" does not exist; create it first or choose a different path

Copy link
Copy Markdown
Collaborator

@lann lann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lann lann merged commit ce5c67f into bytecodealliance:main May 28, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

wkg get -o some_dir/ gives confusing error if some_dir doesn't exist

2 participants