{"record":{"id":"d28abf0cca1f983e","repo":"puppetlabs/puppet","slug":"no-input-to-process-given-on-command-line-or-stdin","errorCode":null,"errorMessage":"No input to process given on command line or stdin","messagePattern":"No input to process given on command line or stdin","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/face/epp.rb","lineNumber":347,"sourceCode":"\n    when_invoked do |*args|\n      options = args.pop\n      options[:header] = options[:header].nil? ? true : options[:header]\n\n      compiler = create_compiler(options)\n      compiler.with_context_overrides('For rendering epp') do\n        # Print to a buffer since the face needs to return the resulting string\n        # and the face API is \"all or nothing\"\n        #\n        buffer = StringIO.new\n        status = true\n        if options[:e]\n          buffer.print render_inline(options[:e], compiler, options)\n        elsif args.empty?\n          if !STDIN.tty?\n            buffer.print render_inline(STDIN.read, compiler, options)\n          else\n            raise Puppet::Error, _(\"No input to process given on command line or stdin\")\n          end\n        else\n          show_filename = args.count > 1\n          file_nbr = 0\n          args.each do |file|\n            buffer.print render_file(file, compiler, options, show_filename, file_nbr += 1)\n          rescue Puppet::ParseError => detail\n            Puppet.err(detail.message)\n            status = false\n          end\n        end\n        raise Puppet::Error, _(\"error while rendering epp\") unless status\n\n        buffer.string\n      end\n    end\n  end\n","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/face/epp.rb#L329-L365","documentation":"Raised by the `render` action of `puppet epp` when there is no template to render: no `-e` inline source, no file arguments, and STDIN is an interactive TTY (piped stdin would be rendered instead via `render_inline(STDIN.read, ...)`). Like the other epp actions, the face is all-or-nothing and aborts rather than blocking on the terminal.","triggerScenarios":"Plain `puppet epp render` in an interactive shell; automation invoking render without wiring stdin or passing file arguments.","commonSituations":"Interactive experimentation; scripts where an empty/undefined variable collapses the argument list to nothing; cron or CI jobs missing their input redirection.","solutions":["Inline: `puppet epp render -e 'Hello <%= $name %>' --values '{\"name\":\"World\"}'`","File: `puppet epp render template.epp` (plus --values for parameters)","Pipe: `cat t.epp | puppet epp render`"],"exampleFix":"# before\npuppet epp render\n# after\npuppet epp render -e 'v=<%= $v %>' --values '{\"v\":1}'","handlingStrategy":"validation","validationCode":"abort 'no input: pass -e, template files, or pipe stdin' if ARGV.empty? && $stdin.tty? && !options[:e]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass --values together with file/-e input so rendering has its parameters","In automation, wire stdin explicitly or pass file arguments; never assume non-TTY","Fail fast in wrappers when the template variable is empty"],"tags":["epp","cli","missing-input","stdin"],"backgroundTag":"missing-input","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}