Comments (9)
I'm not the best with Coffeescript, but this is something I threw in my init.coffee to read all my paths currently saved in my zsh config, and then set them in Atom. Worked like a charm. Current setup is for a Mac, should be the same for Linux, Windows however will probably need some tweaking. You can of course change the .zshrc file to anything else you need if required.
https://gist.github.com/dustinblackman/db56445e5d649ccbd2b2
fs = require('fs')
# Import ENV from zsh config.
fs.readFile process.env.HOME+"/.zshrc", "utf8", (err, zshFile) ->
envPaths = []
for l in zshFile.split('\n')
if l.substring(0,11) is 'export PATH'
e = l.split('=').splice(-1)[0]
e = e.replace(':$PATH','').replace(/"/g,'')
if ':' in e
for x in e.split(':')
envPaths.push(x)
else
envPaths.push(e)
process.env.PATH = envPaths.join(':')
from atom-script.
@hansrodtang What do you think about my patch related to this on #98?
from atom-script.
How are you launching?
from atom-script.
@hansrodtang From a comment on #98:
This definitely is something that doesn't belong in atom-script. Regardless, below are a few immediate findings.
Turns out if you add a key under editor/core the main settings page will register that on window reload (or closing and restarting atom):
# ~/.atom/config.cson 'core': 'PATH': '/Users/ecarey/.rbenv/shims:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin' ... 'projectHome': '/Users/ecarey/repositories'# ~/.atom/init.coffee path = atom.config.get('core.PATH') if path process.env.PATH = pathA few possible difficulties with this method:
- Reloading windows, how would that work?
- How does this affect launching from the command line?
- Should we use a PATH_PREFIX instead and prepend it on init?
from atom-script.
@hansrodtang - Is this problem still coming up? Where are you launching from?
from atom-script.
This is still a problem. I am launching it trough GUI, this worked before (after adding stuff to some .bashrc file). But now atom-script won't detect it even though plugins like atom-terminal (command env) detects them just fine.
from atom-script.
Chiming in that I too experienced this issue (with Scala). The path referenced in the message is identical to @hansrodtang. I have Scala installed via homebrew and so a path with /usr/local/bin is required.
The solution @erran referenced did work however.
from atom-script.
In the hopes it may save people time finding a solution for this, I did what @hansrodtang did in a related issue to solve this on OS X.
I added the following to ~/.bash_profile:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
from atom-script.
@jeffcjohnson Interesting.
from atom-script.
Related Issues (20)
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated.
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated. HOT 1
- Runtime Input
- HTMLDocument.registerElement is deprecated. HOT 1
- TypeError HOT 1
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated. HOT 1
- certificate has expired HOT 1
- Port this to Pulsar
- HTMLDocument.registerElement is deprecated.
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated.
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated. HOT 1
- HTMLDocument.registerElement is deprecated.
- HTMLDocument.registerElement is deprecated.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-script.