ID 597554 - Nuke adds duplicate paths to the PATH environment variable when opening new comps

Follow

Problem summary
Nuke adds duplicate paths to the PATH environment variable when opening new comps.
This issue only seem to happen on Windows.
 
Customer reported version
Nuke 15.0v4
 
Customer reported platform
Windows 10
 
Steps to reproduce
 
1) Open Nuke.
 
2) Open the Script Editor and execute the following Python code:

import os print(len(os.environ['PATH']))
 
3) Take note of the number printed.
 
4) Open a new Nuke comp (File > New Comp...).
 
5) Open the Script Editor in this new window and execute the same Python code again:
import os print(len(os.environ['PATH']))
 
Additionally, running the following will show that there are duplicate paths being added.
import os print(os.environ['PATH'])
 
6) You can keep repeating steps 4 & 5, and see that the number of paths keeps increasing.
 
Expected behaviour
Nuke should not duplicate paths added to the PATH environment variable.
 
Actual behaviour
Opening new Nuke comps will add duplicate paths added to the PATH environment variable.
 
Workaround
Unknown. 
 
Reproduced by support
This bug has been reproduced in:
Nuke 16.0v1 - Windows 11
Nuke 12.0v1 - Windows 11
 
Unable to reproduce bug in:
Nuke 16.0v1 - Linux Rocky 9 - macOS 12
 
Earliest version tested
Nuke 12.0v1 - Windows 11
- This issue appears to be in all tested versions of the product on Windows

    We're sorry to hear that

    Please tell us why