mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
save as admin - handle case for readonly files
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
# If root, ensure that --user-data-dir or --write-elevated-helper is specified
|
||||
# If root, ensure that --user-data-dir or --sudo-write is specified
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
for i in $@
|
||||
do
|
||||
if [[ $i == --user-data-dir=* || $i == --write-elevated-helper ]]; then
|
||||
if [[ $i == --user-data-dir=* || $i == --sudo-write ]]; then
|
||||
CAN_LAUNCH_AS_ROOT=1
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user