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

check_target_filesystem_free_space: Error message not using color #56

Closed
brlin-tw opened this issue May 23, 2021 · 1 comment
Closed
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@brlin-tw
Copy link
Member

brlin-tw commented May 23, 2021

Describe the bug

WoeUSB/sbin/woeusb

Lines 1289 to 1293 in 69af694

if [ "${needed_space}" -gt "${free_space}" ]; then
echo 'Error: Not enough free space on target partition!' >&2
echo "Error: We required ${needed_space_human_readable}(${needed_space} bytes) but '${target_partition}' only has ${free_space_human_readable}(${free_space} bytes)." >&2
return 1
fi

Should use printf_with_color or the to-be-implemented printf_error.

@brlin-tw brlin-tw added bug Something isn't working enhancement New feature or request good first issue Good for newcomers and removed enhancement New feature or request labels May 23, 2021
brlin-tw added a commit that referenced this issue May 23, 2021
Currently, we use generic printf\* functions to output application messages, however, it creates some problems:

1. Ununified output formats (#58, #56, #54, #52).
1. Unnecessary manually adding color codes to give color to messages, which is often forgotten (#56).
1. Unnecessary manually adding message class and function tags, which are often forgotten, case ununified, or misplaced. (#54, #58).
1. Unnecessary manually setting redirection for warning and error messages, which is often forgotten (#51).

By implementing specific functions for each INFO/WARNING/ERROR message we can fix these issues altogether.

Fixes #51, #52, #54, #56, #58, #60.

Incidentally fixes #55 in the process.

Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
@brlin-tw
Copy link
Member Author

Fixed by 6151f41.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant