Try to bear with me as I am fairly new to this and don't have much coding experience.
Im trying to use a ruby script to add a location to my PATH variable. So far I just have
path = ENV['PATH'].to_s
ENV['PATH'] = path + ";" + location
print ENV['PATH']
The problem is that the file seems to be added to the PATH and prints with it, but when I go check my path variable the new location is not there.
Also, when I run a separate script of which is one line:
print ENV['PATH']
the new location is not there either.
My question is is there a way to make the new PATH "save" instead of reverting to the old PATH when the script is finished?