Skip to content

Allow yaml in script and automation#3862

Merged
bramkragten merged 5 commits into
devfrom
yaml-script-automation
Oct 2, 2019
Merged

Allow yaml in script and automation#3862
bramkragten merged 5 commits into
devfrom
yaml-script-automation

Conversation

@bramkragten
Copy link
Copy Markdown
Member

Part of #3784

isvalid: true,
value:
props.value && !isEmpty(props.value)
? yaml.safeDump(props.value)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What if this raises ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yaml.safeDump(() => {})

Comment thread src/panels/config/js/yaml_textarea.tsx Outdated
: undefined,
: undefined;
} catch (err) {
alert(`There is an error in the YAML: ${err}`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not an error in the YAML, could not convert it to YAML .

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But we don't have any other way to save the config than YAML? So where could the error come from? YAML -> JSON -> YAML?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good question, I don't know :D

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's fine.

@bramkragten bramkragten merged commit cd6fd6a into dev Oct 2, 2019
@delete-merged-branch delete-merged-branch Bot deleted the yaml-script-automation branch October 2, 2019 19:21
@bramkragten bramkragten mentioned this pull request Oct 2, 2019
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants