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

panic misusing --json-body argument #449

Open
davepacheco opened this issue Dec 1, 2023 · 0 comments
Open

panic misusing --json-body argument #449

davepacheco opened this issue Dec 1, 2023 · 0 comments

Comments

@davepacheco
Copy link

Trying to work around a bug in image import, I tried to create an image from a URL. I wasn't sure how to use it:

$ oxide image create
error: the following required arguments were not provided:
  --json-body <JSON-FILE>
  --description <description>
  --name <name>
  --os <os>
  --version <version>

In terms of the json-body, I thought I could guess my way there:

$ echo '{"source": { "url": "http://catacomb.eng.oxide.computer/media/cloud/debian-11-genericcloud-amd64.raw", block_size: 512 } }' | oxide image create --name my-image --description my-description --os debian --version 11 --json-body -
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', cli/src/generated_cli.rs:5800:59
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(17), ...)', cli/src/main.rs:59:10

I guess it doesn't treat - as stdin and then panicked because it tried to open it and it wasn't there?

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

1 participant