opened
ospatil
username_0
- VSCode Version: 0.10.11
- OS Version: OS X El Capitan 10.11.4
- Node Version: 5.10.1

Steps to Reproduce:

1. Launch code from terminal `code .`. It fails with the following error - 
```bash
File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
                          ^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory
```

It used to work perfectly alright before the OS X upgrade to 10.11.4. Just to be sure, I uninstalled code from PATH and installed it again through command palette but no luck.
VS Code can not be launched from terminal on Mac
issue
created
bpasero
username_1
Weird. @username_3 @username_2 ever seen this?
comment
created
Tyriar
username_2
This is only part of the OSX launch script, a small Python script is used I think to get the current directory. We really don't want to rely on Python unless we absolutely have to. This might be happening due to a [super old Python version](https://docs.python.org/2/library/os.path.html#os.path.realpath) or something, not really a problem we want to bother figuring out.

@username_3 was the purpose of this to get the actual hard link for the file? [I needed to do this for the Linux one too](https://github.com/Microsoft/vscode/blob/master/resources/linux/bin/code.sh#L23) when I moved the CLI to the program directory. Should probably do something similar `readlink` seems like it's available on OSX. Here's the Linux code:

```
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 $0))/.."
	else
		# else use the standard install location
		VSCODE_PATH="/usr/share/@@NAME@@"
	fi
fi
```
comment
created
ospatil
username_0
It could be _super new Python version_ also :wink: . What I have is `Python 3.5.1 :: Anaconda custom (x86_64)`.
comment
created
joaomoreno
username_3
Duplicate of #3790, fixed by 70ab81b95eebca26dd5465b3d0b8e094140b5a4b

@username_2 `readlink` is not the same on OS X. It's a rollercoaster of *doesn't works*.
comment
closed
joaomoreno
username_3
issue