fix: Properly escape module json
This commit is contained in:
parent
ce717118ce
commit
fbf57e5c83
6 changed files with 11 additions and 17 deletions
|
|
@ -1,9 +1,9 @@
|
|||
use std::{borrow::Cow, path::PathBuf, process};
|
||||
use std::{borrow::Cow, path::PathBuf};
|
||||
|
||||
use blue_build_utils::syntax_highlighting::highlight_ser;
|
||||
use colored::Colorize;
|
||||
use indexmap::IndexMap;
|
||||
use log::{error, trace, warn};
|
||||
use log::{trace, warn};
|
||||
use miette::{bail, Result};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_yaml::Value;
|
||||
|
|
@ -62,14 +62,6 @@ impl<'a> ModuleRequiredFields<'a> {
|
|||
self.get_module_type_list("containerfile", "snippets")
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn print_module_context(&'a self) -> String {
|
||||
serde_json::to_string(self).unwrap_or_else(|e| {
|
||||
error!("Failed to parse module!!!!!: {e}");
|
||||
process::exit(1);
|
||||
})
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[allow(clippy::missing_const_for_fn)]
|
||||
pub fn get_copy_args(&'a self) -> Option<(Option<&'a str>, &'a str, &'a str)> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue