specified LoaderOptions.
authorErik Brakkee <erik@brakkee.org>
Sun, 10 Nov 2024 16:48:10 +0000 (17:48 +0100)
committerErik Brakkee <erik@brakkee.org>
Sun, 10 Nov 2024 16:48:10 +0000 (17:48 +0100)
src/org/wamblee/jenkins/pipelinelib/MyYaml.groovy

index d9b370841871fe407ca833dcc750362a6c3c0032..ccae43d92acca8eaccc3592f61d909674a241d3f 100644 (file)
@@ -1,5 +1,6 @@
 package org.wamblee.jenkins.pipelinelib
 
+import org.yaml.snakeyaml.LoaderOptions
 @Grab('org.yaml:snakeyaml:2.3')
 
 import org.yaml.snakeyaml.Yaml
@@ -14,7 +15,7 @@ class MyYaml {
   private final Yaml parser
 
   MyYaml() {
-    parser = new Yaml(new SafeConstructor())
+    parser = new Yaml(new SafeConstructor( new LoaderOptions()))
   }
 
   String merge(List<String> yamls) {