Skip to content

scripts/warn-outside-container: fix font representation#6839

Open
literally-user wants to merge 1 commit intodocker:masterfrom
literally-user:6838-fix-font-representation
Open

scripts/warn-outside-container: fix font representation#6839
literally-user wants to merge 1 commit intodocker:masterfrom
literally-user:6838-fix-font-representation

Conversation

@literally-user
Copy link

@literally-user literally-user commented Mar 4, 2026

Fixed font display in /scripts/warn-outside-container by replacing echo with POSIX-compatible prinf so that display works on any POSIX-compatible systems.

Fixes #6838

image

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I recall we had a PR for this, but it had some issues (#4211), so we can go with your PR instead; however, it looks like shellcheck linting is failing; can you fix that? (please amend the commit, so that there's only one commit in the PR)

@literally-user
Copy link
Author

Oh, i see! Yeah, i'll fix that asap

@literally-user literally-user force-pushed the 6838-fix-font-representation branch from 8f44542 to 914fd74 Compare March 5, 2026 11:34
@thaJeztah thaJeztah added this to the 29.3.0 milestone Mar 5, 2026
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I just tried, and looks like there was an issue; I posted the correct variant (you can copy/paste it.

Comment on lines +13 to +22
printf "\n"
printf "\033[1mWARNING\033[0m: you are not in a container."
printf
printf 'Use "\033[1mmake dev\033[0m" to start an interactive development container,'
printf 'use "\033[1mmake -f docker.Makefile %s\033[0m" to execute this target' "$target"
printf "in a container, or set \033[1mDISABLE_WARN_OUTSIDE_CONTAINER=1\033[0m to"
printf "disable this warning."
printf
printf "Press \033[1mCtrl+C\033[0m now to abort, or wait for the script to continue.."
printf "\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some printf's didn't have an argument, causing a failure;

make binary WARNING: you are not in a container.printf: usage: printf [-v var] format [arguments] ./scripts/build/binary

We should also preserve the newlines (which echo automatically added); this should probably be the right one;

						printf "\n"
						printf "\033[1mWARNING\033[0m: you are not in a container.\n"
						printf "\n"
						printf 'Use "\033[1mmake dev\033[0m" to start an interactive development container,\n'
						printf 'use "\033[1mmake -f docker.Makefile %s\033[0m" to execute this target\n' "$target"
						printf "in a container, or set \033[1mDISABLE_WARN_OUTSIDE_CONTAINER=1\033[0m to\n"
						printf "disable this warning.\n"
						printf "\n"
						printf "Press \033[1mCtrl+C\033[0m now to abort, or wait for the script to continue..\n"

@vvoland vvoland modified the milestones: 29.3.0, 29.3.1 Mar 5, 2026
Signed-off-by: Davlat Davydov <literally_user@hotmail.com>

fix CI

review changes
@literally-user literally-user force-pushed the 6838-fix-font-representation branch from 914fd74 to 71db152 Compare March 5, 2026 16:34
@literally-user
Copy link
Author

literally-user commented Mar 5, 2026

Fixed. Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong ANSI font representation

4 participants