mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 19:59:37 +00:00
@@ -5,12 +5,11 @@
|
|||||||
|
|
||||||
# If root, ensure that --user-data-dir is specified
|
# If root, ensure that --user-data-dir is specified
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
while test $# -gt 0
|
for i in $@
|
||||||
do
|
do
|
||||||
if [[ $1 == --user-data-dir=* ]]; then
|
if [[ $i == --user-data-dir=* ]]; then
|
||||||
DATA_DIR_SET=1
|
DATA_DIR_SET=1
|
||||||
fi
|
fi
|
||||||
shift
|
|
||||||
done
|
done
|
||||||
if [ -z $DATA_DIR_SET ]; then
|
if [ -z $DATA_DIR_SET ]; then
|
||||||
echo "It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument." 1>&2
|
echo "It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument." 1>&2
|
||||||
|
|||||||
Reference in New Issue
Block a user