mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
crosutils: disallow running build_packages/setup_board as root
Running these as root does not make sense. Furthermore, it will fail on calling cros-workon, which sometimes fails but most certainly will not give correct information anyway. BUG=chromium-os:30384 TEST=run build_packages/setup_board with/without sudo Change-Id: I0cba72334369e35ba0e864c53fd81037ee9e0efa Reviewed-on: https://gerrit.chromium.org/gerrit/23003 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Zdenek Behan <zbehan@chromium.org> Tested-by: Zdenek Behan <zbehan@chromium.org>
This commit is contained in:
parent
4d8c285509
commit
05780783a9
@ -11,6 +11,8 @@ restart_in_chroot_if_needed "$@"
|
|||||||
|
|
||||||
get_default_board
|
get_default_board
|
||||||
|
|
||||||
|
assert_not_root_user
|
||||||
|
|
||||||
# Developer-visible flags.
|
# Developer-visible flags.
|
||||||
DEFINE_string board "${DEFAULT_BOARD}" \
|
DEFINE_string board "${DEFAULT_BOARD}" \
|
||||||
"The board to build packages for."
|
"The board to build packages for."
|
||||||
|
@ -12,6 +12,8 @@ restart_in_chroot_if_needed "$@"
|
|||||||
|
|
||||||
get_default_board
|
get_default_board
|
||||||
|
|
||||||
|
assert_not_root_user
|
||||||
|
|
||||||
# Developer-visible flags.
|
# Developer-visible flags.
|
||||||
DEFINE_string board "$DEFAULT_BOARD" \
|
DEFINE_string board "$DEFAULT_BOARD" \
|
||||||
"The name of the board to set up."
|
"The name of the board to set up."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user