mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:59:47 -05:00
* Initial VS Code 1.21 file copy with patches * A few more merges * Post npm install * Fix batch of build breaks * Fix more build breaks * Fix more build errors * Fix more build breaks * Runtime fixes 1 * Get connection dialog working with some todos * Fix a few packaging issues * Copy several node_modules to package build to fix loader issues * Fix breaks from master * A few more fixes * Make tests pass * First pass of license header updates * Second pass of license header updates * Fix restore dialog issues * Remove add additional themes menu items * fix select box issues where the list doesn't show up * formatting * Fix editor dispose issue * Copy over node modules to correct location on all platforms
37 lines
1.1 KiB
Bash
Executable File
37 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
|
|
# If root, ensure that --user-data-dir or --file-write is specified
|
|
if [ "$(id -u)" = "0" ]; then
|
|
for i in $@
|
|
do
|
|
if [[ $i == --user-data-dir || $i == --user-data-dir=* || $i == --file-write ]]; then
|
|
CAN_LAUNCH_AS_ROOT=1
|
|
fi
|
|
done
|
|
if [ -z $CAN_LAUNCH_AS_ROOT ]; then
|
|
echo "You are trying to start SQL Operations Studio as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument." 1>&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if [ ! -L $0 ]; then
|
|
# if path is not a symlink, find relatively
|
|
VSCODE_PATH="$(dirname $0)/.."
|
|
else
|
|
if which readlink >/dev/null; then
|
|
# if readlink exists, follow the symlink and find relatively
|
|
VSCODE_PATH="$(dirname $(readlink -f $0))/.."
|
|
else
|
|
# else use the standard install location
|
|
VSCODE_PATH="/usr/share/@@NAME@@"
|
|
fi
|
|
fi
|
|
|
|
ELECTRON="$VSCODE_PATH/@@NAME@@"
|
|
CLI="$VSCODE_PATH/resources/app/out/cli.js"
|
|
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
|
|
exit $?
|