Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add premake.info message function. #814

Merged
merged 1 commit into from
Jun 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/base/_foundation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,23 @@
end


--
-- Display information in the term.infoColor color.
--
-- @param message
-- The info message, which may contain string formatting tokens.
-- @param ...
-- Values to fill in the string formatting tokens.
--

function premake.info(message, ...)
message = string.format(message, ...)
term.pushColor(term.infoColor)
io.stdout:write(string.format("** Info: " .. message .. "\n", ...))
term.popColor();
end



--
-- A shortcut for printing formatted output.
Expand Down
1 change: 1 addition & 0 deletions src/base/term.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ term.white = 15
-- colors for specific purpose.
term.warningColor = term.magenta
term.errorColor = term.lightRed
term.infoColor = term.lightCyan

-- color stack implementation.
term._colorStack = {}
Expand Down