-
Notifications
You must be signed in to change notification settings - Fork 75
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
CLI: add human-readable error when [build] script
exits with 1
#513
Labels
Comments
chicoxyzzy
added
enhancement
New feature or request
good first issue
Good for newcomers
cli
labels
Aug 1, 2023
I'll save my code here: String wrapInASCIIBox(const String& text) {
Vector<String> lines;
std::istringstream iss(text);
String line;
size_t max_length = 0;
while (std::getline(iss, line)) {
lines.push_back(line);
if (line.size() > max_length) {
max_length = line.size();
}
}
String topBottomBorder = "+" + String(max_length + 2, '-') + "+";
String result = topBottomBorder + "\n";
for (const auto& l : lines) {
result += "| " + l + String(max_length - l.size(), ' ') + " |\n";
}
result += topBottomBorder + "\n";
return result;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: