diff --git a/.drone.yml b/.drone.yml index 27f30ac..bf77c9f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,8 +21,8 @@ steps: - name: build amd64 image: rust:1.73-alpine commands: - - ./version.sh - - apk add --no-cache musl-dev gcc-aarch64-none-elf + - pwd && ls -al && ./version.sh + - apk add --no-cache musl-dev gcc-aarch64-none-elf bash - mkdir /artifacts/mouse-amd64 - cp LICENSE.txt /artifacts/mouse-amd64/ - mkdir /artifacts/mouse-arm64 diff --git a/.gitignore b/.gitignore index 4523c61..f053105 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .vscode/ *.un~ *.swp +mouse_out.yml diff --git a/src/main.rs b/src/main.rs index 970ac15..4ac0800 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,6 @@ use crate::gatherers::environment::EnvironmentData; use crate::gatherers::ip::{IPData, IPRouteData}; use crate::types::fact::Fact; use clap::Parser; -use serde::de::Error; use serde_json::Value; use std::collections::{HashMap, HashSet}; use yaml_rust::{YamlEmitter, YamlLoader}; @@ -92,6 +91,9 @@ fn main() { match output_format { "json" => println!("{}", data_output), "yaml" => { + // We will run the string back through yaml_rust, for better output compatibility. + // We could choose to swwitch serde_yaml out completely but at this time I don't see + // a huge value, as once serde_yaml fixes their implementation,... let tmp = format!("---\n{}", data_output); let yr = YamlLoader::load_from_str(tmp.as_str()).unwrap(); let mut out = String::new();