Skip to content
Open
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
19 changes: 9 additions & 10 deletions scripts/warn-outside-container
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ if [ -z "${DISABLE_WARN_OUTSIDE_CONTAINER:-}" ]; then
;;
*)
(
echo
echo "\033[1mWARNING\033[0m: you are not in a container."
echo
echo 'Use "\033[1mmake dev\033[0m" to start an interactive development container,'
echo "use \"\033[1mmake -f docker.Makefile $target\033[0m\" to execute this target"
echo "in a container, or set \033[1mDISABLE_WARN_OUTSIDE_CONTAINER=1\033[0m to"
echo "disable this warning."
echo
echo "Press \033[1mCtrl+C\033[0m now to abort, or wait for the script to continue.."
echo
printf "\n"
printf "\033[1mWARNING\033[0m: you are not in a container.\n"
printf "\n"
Comment on lines +13 to +15
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"

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"
) >&2
sleep 5
;;
Expand Down