<div dir="ltr">From <a href="https://github.com/creationix/nvm">https://github.com/creationix/nvm</a><div><br><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:16px"><i><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px">nvm use</code><span class="inbox-inbox-Apple-converted-space"> </span>will not, by default, create a "current" symlink. Set<span class="inbox-inbox-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px">$NVM_SYMLINK_CURRENT</code><span class="inbox-inbox-Apple-converted-space"> </span>to "true" to enable this behavior, which is sometimes useful for IDEs. Note that using<span class="inbox-inbox-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-radius:3px">nvm</code><span class="inbox-inbox-Apple-converted-space"> </span>in multiple shell tabs with this environment variable enabled can cause race conditions.</i></p></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 28 Oct 2016 at 06:40 Allan Odgaard <<a href="mailto:mailinglist@textmate.org">mailinglist@textmate.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div style="font-family:sans-serif" class="gmail_msg"><div style="white-space:normal" class="gmail_msg">
<p dir="auto" class="gmail_msg">On 28 Oct 2016, at 6:49, Graham Heath wrote:</p>

<p dir="auto" class="gmail_msg"></p></div>
<div style="white-space:pre-wrap" class="gmail_msg"><blockquote style="border-left:2px solid #777;color:#777;margin:0 0 5px;padding-left:5px" class="gmail_msg"><div dir="auto" class="gmail_msg">For NVM to keep multiple versions in the path it adds ~/.nvm/nvm.sh to your
</div><div dir="auto" class="gmail_msg">.bash_profile, which interns amends the "default nvm-node path" to PATH.
</div><div dir="auto" class="gmail_msg">Like this, `which node` will return something like
</div><div dir="auto" class="gmail_msg">"/Users/______/.nvm/versions/node/v6.2.2/bin/node".
</div><div dir="auto" class="gmail_msg">
</div><div dir="auto" class="gmail_msg">I could simply add that path to TM_PATH, but if node versions change,
</div><div dir="auto" class="gmail_msg">TextMate will continue using the old version (or worse).
</div><div dir="auto" class="gmail_msg">
</div><div dir="auto" class="gmail_msg">I’m sure some of you are running into this problem. What have you done to
</div><div dir="auto" class="gmail_msg">solve it?
</div></blockquote></div>
</div></div><div class="gmail_msg"><div style="font-family:sans-serif" class="gmail_msg"><div style="white-space:normal" class="gmail_msg">

<p dir="auto" class="gmail_msg">The best way to handle these things is by using symbolic links, so you would have a <code style="background-color:#f7f7f7;border-radius:3px;margin:0;padding:0 0.4em" bgcolor="#F7F7F7" class="gmail_msg">current</code> link pointing to the version you wish to use, and you can add that to <code style="background-color:#f7f7f7;border-radius:3px;margin:0;padding:0 0.4em" bgcolor="#F7F7F7" class="gmail_msg">PATH</code>, then no shell script is required to be executed by apps that want to access the current node.</p>

<p dir="auto" class="gmail_msg">If NVM does not provide such links, I would make it a suggestion.</p>
</div>
</div>
</div>

<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
textmate mailing list<br class="gmail_msg">
<a href="mailto:textmate@lists.macromates.com" class="gmail_msg" target="_blank">textmate@lists.macromates.com</a><br class="gmail_msg">
<a href="http://lists.macromates.com/listinfo/textmate" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.macromates.com/listinfo/textmate</a></blockquote></div>