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

Pass the filepath in the sapio-cli configuration. #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

georgantas
Copy link

Issue

A json object was being passed as the config file in the "Sapio CLI" -> "File" settings tab. From the debug, when clicking "Test Sapio-Cli":

[ 'sapio' ] /home/yianni/workspace/sapio/target/release/sapio-cli [
  '--config',
  { config: '/home/yianni/.config/sapio-cli/config.json' },
  'configure',
  'show'
]

Fix

Correct the Json Schema for this tab.

Testing

Clicked "Test Sapio-Cli" and got "success". Also, checked the debug:

[ 'sapio' ] /home/yianni/workspace/sapio/target/release/sapio-cli [
  '--config',
  '/home/yianni/.config/sapio-cli/config.json',
  'configure',
  'show'
]

@JeremyRubin
Copy link
Contributor

Good find! The fix is a problematic -- these schemas are auto-generated from the contrib settings generator, so tweaking them by hand will get broken when they are updated next.

Is there a fix that can go into the codegen?

@georgantas
Copy link
Author

Ohh, I see. Will have another look.

@georgantas georgantas reopened this Apr 15, 2022
@@ -1,431 +1,458 @@
import { JSONSchema7 } from 'json-schema';
Copy link
Author

Choose a reason for hiding this comment

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

Re-generated this file with cargo run > ../../src/common/settings_gen.ts. Are you running a lint configuration on it?

@@ -0,0 +1,3 @@
[toolchain]
Copy link
Author

Choose a reason for hiding this comment

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

This package was not compiling with the stable toolchain.

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.

2 participants