diff --git a/lib/octocatalog-diff/catalog-util/builddir.rb b/lib/octocatalog-diff/catalog-util/builddir.rb index 67c43cc6..515c42b3 100644 --- a/lib/octocatalog-diff/catalog-util/builddir.rb +++ b/lib/octocatalog-diff/catalog-util/builddir.rb @@ -208,7 +208,7 @@ def install_enc(logger) enc_path = File.join(@tempdir, 'enc.sh') File.open(enc_path, 'w') do |f| f.write "#!/bin/sh\n" - f.write "cat <<-EOF\n" + f.write "cat <<-'EOF'\n" f.write enc_obj.content f.write "\nEOF\n" end diff --git a/spec/octocatalog-diff/tests/catalog-util/builddir_spec.rb b/spec/octocatalog-diff/tests/catalog-util/builddir_spec.rb index 6e1a32ca..f9e72282 100644 --- a/spec/octocatalog-diff/tests/catalog-util/builddir_spec.rb +++ b/spec/octocatalog-diff/tests/catalog-util/builddir_spec.rb @@ -796,7 +796,7 @@ testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger) enc = File.join(testobj.tempdir, 'enc.sh') expect(File.file?(enc)).to eq(true) - expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\n\nEOF\n") + expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\n\nEOF\n") end end @@ -807,7 +807,7 @@ testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger) enc = File.join(testobj.tempdir, 'enc.sh') expect(File.file?(enc)).to eq(true) - expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\n\nEOF\n") + expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\n\nEOF\n") end end @@ -818,7 +818,7 @@ testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger) enc = File.join(testobj.tempdir, 'enc.sh') expect(File.file?(enc)).to eq(true) - expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\n\nEOF\n") + expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\n\nEOF\n") end end @@ -838,7 +838,7 @@ testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger) enc = File.join(testobj.tempdir, 'enc.sh') expect(File.file?(enc)).to eq(true) - expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\nclasses:\n foo: {}\nparameters: {}\n\nEOF\n") + expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\nclasses:\n foo: {}\nparameters: {}\n\nEOF\n") end end end