Method: Yast::CommandLineClass#PrintInternal
- Defined in:
- library/commandline/src/modules/CommandLine.rb
#PrintInternal(string, newline) ⇒ Object
Print a String
Print a string to /dev/tty in interactive mode, to stderr in non-interactive Suppress printing if there are no commands to be handled (starting GUI)
@param [String] string to be printed @param [Boolean] newline if newline character should be added or not
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'library/commandline/src/modules/CommandLine.rb', line 164 def PrintInternal(string, newline) return if !Mode.commandline # avoid using of uninitialized value in .dev.tty perl agent if string.nil? Builtins.y2warning("CommandLine::Print: invalid argument (nil)") return end if @interactive if newline SCR.Write(path(".dev.tty"), string) else SCR.Write(path(".dev.tty.nocr"), string) end elsif newline SCR.Write(path(".dev.tty.stderr"), string) else SCR.Write(path(".dev.tty.stderr_nocr"), string) end nil end |