Skip to content

Commit e13fa29

Browse files
committed
opt-out by setting the variable to a special value
1 parent 66734c7 commit e13fa29

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

nb/ide.launcher/unix/netbeans

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ cd "$progdir"/..
3838
basedir=`pwd`
3939
cd "$old"
4040

41-
# make sure own launcher is on PATH
42-
PATH=$PATH:$progdir
43-
4441
case "`uname`" in
4542
Darwin*)
4643
# set default userdir and cachedir on Mac OS X
@@ -68,6 +65,13 @@ fi
6865

6966
export DEFAULT_USERDIR_ROOT
7067

68+
if [ "$NETBEANS_USERDIR" = "nope" ]; then
69+
# setting NETBEANS_USERDIR to none is an opt-out
70+
else
71+
# make sure own launcher directory is on PATH as a fallback
72+
PATH=$PATH:$progdir
73+
fi
74+
7175
# #68373: look for userdir, but do not modify "$@"
7276
if [ -z "$NETBEANS_USERDIR" ]; then
7377
userdir="${netbeans_default_userdir}"

nb/o.n.upgrader/arch.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,15 @@
646646
and will open files in the same instance just as
647647
<a href="https://github.com/apache/netbeans/pull/8756">#8756 illustrates</a>.
648648
</p>
649+
<p>
650+
The launcher also modifies the <code>PATH</code> variable
651+
by appending its own diretory - making sure typing <code>netbeans</code>
652+
gets handled in the internal NetBeans terminal at all.
653+
In the unusual and rare cases when <b>opt-out</b> of this
654+
behavior maybe needed, just
655+
set the environment variable to <code>nope</code> to instruct
656+
the launcher to avoid these environment variable modifications.
657+
</p>
649658
</api>
650659
</li>
651660
</ul>

0 commit comments

Comments
 (0)