save as admin - handle case for readonly files

This commit is contained in:
Benjamin Pasero committed 2017-12-14 15:50:21 +01:00
1 parent 8f18e87477
commit 4e9cd88e37
8 files changed
+111 -55

No files matched your search

+2 -2
View File
@@ -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