Skip to content

Conversation

@matevz
Copy link
Member

@matevz matevz commented Jan 15, 2026

This makes it possible to use the Oasis CLI for automation.

@matevz matevz requested a review from ptrus January 15, 2026 12:07
@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for oasisprotocol-cli ready!

Name Link
🔨 Latest commit 342400a
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-cli/deploys/6971ea9856185e0008a875d3
😎 Deploy Preview https://deploy-preview-677--oasisprotocol-cli.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@matevz matevz force-pushed the matevz/feature/account-show-json branch 3 times, most recently from 1d0ac28 to caa5bd3 Compare January 20, 2026 09:43
@matevz matevz changed the title Add JSON format for oasis account show Add JSON format for account show and rofl machine show Jan 20, 2026
cobra.CheckErr("Machine instance not found.\nTip: This often happens when instances expire. Run `oasis rofl deploy --replace-machine` to rent a new one.")
switch common.OutputFormat() {
case common.FormatJSON:
fmt.Printf("{ \"error\": \"%s\" }\n", err)
Copy link
Member

Choose a reason for hiding this comment

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

cobra.CheckErr in the other case also exits the program, while this one doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

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

It exits later in L74. Here it only prints the error to stdout in JSON, so you can capture and process it.

@matevz matevz force-pushed the matevz/feature/account-show-json branch from 6a6f8a5 to 65a8648 Compare January 21, 2026 16:02
@matevz matevz force-pushed the matevz/feature/account-show-json branch from 65a8648 to 5490548 Compare January 22, 2026 09:07
@matevz matevz merged commit f4015f0 into master Jan 22, 2026
5 of 11 checks passed
@matevz matevz deleted the matevz/feature/account-show-json branch January 22, 2026 09:49
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.

4 participants