我试过这样做:
sudo ln -s "/Applications/WebStorm.app/Contents/MacOS/webide" /bin/webstorm
然后如果我运行它,它会抛出
013-10-26 15:40:56.191 webstorm[12210:1f03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString hasPrefix:]: nil argument'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff895cc41c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff863eae75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff895cc2cc +[NSException raise:format:] + 204
3 CoreFoundation 0x00007fff894e572a -[__NSCFString hasPrefix:] + 90
4 webstorm 0x0000000100001f03 satisfies + 435
5 webstorm 0x000000010000245d findMatchingVm + 1213
6 webstorm 0x0000000100003832 -[Launcher launch] + 98
7 Foundation 0x00007fff8fdf170b __NSThread__main__ + 1318
8 libsystem_pthread.dylib 0x00007fff847bd899 _pthread_body + 138
9 libsystem_pthread.dylib 0x00007fff847bd72a _pthread_struct_init + 0
10 libsystem_pthread.dylib 0x00007fff847c1fc9 thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
那么,如何从终端启动 webstorm?
附言。有趣的是,如果我直接运行它,它会运行
"/Applications/WebStorm.app/Contents/MacOS/webide"
但我更喜欢比这更短的东西