Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

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

Open
1 of 2 tasks
sergei3000 opened this issue Jun 23, 2019 · 4 comments
Open
1 of 2 tasks

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

sergei3000 opened this issue Jun 23, 2019 · 4 comments

Comments

@sergei3000
Copy link

sergei3000 commented Jun 23, 2019

  • I have reset Atom to defaults prior to submitting report.
  • I have not reset Atom to defaults prior to submitting report.

Description

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

(base) Sergeys-MacBook-Pro:~ sergeyzakharov$ echo $PATH
/anaconda3/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Atom:

(base) Sergeys-MacBook-Pro:~ sergeyzakharov$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/anaconda3/bin:/anaconda3/condabin

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
Copy link
Collaborator

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
Copy link
Author

sergei3000 commented Jun 26, 2019

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
Copy link
Collaborator

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
Copy link

mzperix commented Oct 15, 2020

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants