Skip to content

Commit

Permalink
Merge pull request #43387 from peidaqi/patch-1
Browse files Browse the repository at this point in the history
Making the script work with both Python2 and 3
  • Loading branch information
joaomoreno authored Feb 13, 2018
2 parents 00f2d8e + 100b58a commit 10f4d56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/darwin/bin/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

function realpath() { /usr/bin/python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$0"; }
function realpath() { /usr/bin/python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")"
ELECTRON="$CONTENTS/MacOS/Electron"
CLI="$CONTENTS/Resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
exit $?
exit $?

0 comments on commit 10f4d56

Please sign in to comment.