platformio / platformio-atom-ide-terminal

A terminal package for Atom, complete with themes, API and more for PlatformIO IDE
https://atom.io/packages/platformio-ide-terminal
MIT License
613 stars 162 forks source link

Different PATH in system Terminal and in Atom Terminal (mac). #703

Open sergei3000 opened 5 years ago

sergei3000 commented 5 years ago

Steps to reproduce

  1. Run echo $PATH in system Terminal.
  2. Run echo $PATH in Atom Terminal.

Expected behavior: Same output - Anaconda paths are in the beginning in both terminals.

Actual behavior: Different output: Anaconda paths are in the beginning in the system terminal, but they are in the end in Atom's terminal.

Reproduces how often: 100%.

Versions

> atom --version

Atom : 1.38.2 Electron: 2.0.18 Chrome : 61.0.3163.100 Node : 8.9.3

> apm --version

This has different output in different terminals also (see Python version). System Terminal: apm 2.1.7 npm 6.2.0 node 8.9.3 x64 atom 1.38.2 python 3.7.2 git 2.20.1

Atom Terminal: apm 2.1.7 npm 6.2.0 node 8.9.3 x64 atom 1.38.2 python 2.7.10 git 2.20.1

OS name and version: macOS Mojave 10.14.4 (18E226) Platformio-ide-terminal version: 2.9.1

Additional Information

na

the-j0k3r commented 5 years ago

Hello @sergei3000! Thank you for reaching out to us with this issue report.

So to start clearing things up, you have installed anaconda, right? Can you post a link to the installer you used?

Also, terminal wise as in the default in macOS, have you added any further plugins to it, if so which?

Different PATH for system Terminal and for Atom Terminal. System:

Ive seen this before in other reports, usually its some 3rd party something interfering, Try to export your paths to ~/.bash_profile and see if it helps.

This has different output in different terminals also (see Python version).

Well have you had these different python versions installed? Can you post a link to the python version you installed?

Once you reply, with the extra information, I'll try to duplicate, with Vanilla OS + Atom + Platformio-ide-terminal + the exact installers you used.

I suspect this is related to #426 because the term.js this project uses is unmaintained and no longer suitable for supporting the exact methods the base terminal uses, that said, the large majority of issues is caused by users adding 3rd party programs that interfere and break Atom + Platformio-ide-terminal.

Waiting on your feedback.

sergei3000 commented 5 years ago

hi @the-j0k3r,

Yes, I have installed Anaconda distribution. I'm sorry, but I don't remember which exact installer I used. My current Python version is 3.7.2, but I might have upgraded it at some point.

My Terminal is default.

Following your advice to export paths to ~/.bash_profile, I managed to get everything working for me with this line at the top: export PATH=/anaconda3/bin:/anaconda3/condabin:$PATH. Now my echo $PATH in Atom terminal prints out this: /anaconda3/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/anaconda3/bin:/anaconda3/condabin And in the system terminal I get this: /anaconda3/bin:/anaconda3/condabin:/anaconda3/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin It's ugly (and I think this does not solve the bug), but it's working for me now. Thanks!

My Python version is 3.7.2 in Anaconda, and also I have system Python2 and Python3 outside Anaconda.

the-j0k3r commented 5 years ago

Sadly theres nothing else to be done with this at this time, the bug comes from (and in part) term.js which is an abandoned project and we rely on as a project dependency.

To fully solve the bug we need to implement xterm.js with a more robust in project implementation of this to ensure things such as this stick. The problem is this project is fully dependant on users for contributions/fixes/features etc and until someone comes along that can do it and is willing and patient, were out of luck.

Thanks you for your understanding.

mzperix commented 3 years ago

Managed to hack it like this in settings:

Input into "Shell override": /usr/bin/env Input into "Shell arguments": -u PATH zsh (or use bash if you want to)

This will take PATH env var out before running zsh (or bash).