wash
wash copied to clipboard
[BUG] `wash claims inspect` reports incorrect error message for missing file
Describe the bug I was attempting to inspect an actor file when I had the incorrect filename, and I got the following error:
wash claims inspect build/echotg_s.wasm
Pulling artifacts with tag 'latest' is prohibited. This can be overriden with a flag
Or with JSON output:
wash claims inspect build/echotg_s.wasm -o json
{
"success": false,
"error": "Pulling artifacts with tag 'latest' is prohibited. This can be overriden with a flag"
}
This is because the original failure to find a file results in a fallback to pull an OCI artifact. We should be able to parse the argument for claims inspect
and par inspect
to determine if it's truly a path or a URL and report errors accordingly.
To Reproduce Steps to reproduce the behavior:
- Install
wash
- Run
wash claims inspect hooha/notareal/path.wasm
- View error
Expected behavior
In this case where I had the filename wrong, I should get an error stating that no file was found. We can still default to trying to pull an OCI artifact just in case there's some edge case with a URL that looks like a filepath (e.g. build.com/myartifact/wasm
is both a valid URL and path) but we should at least have an indication that wash
couldn't find a file.