I see many similar questions, but nothing that is exactly the same as my problem, so I have done my research.
I'm trying to access this variable operatingSystem
from my main file in my function install
. Now, I know I could pass it with install(operatingSystem)
but I have 10 other variables like it and I don't want to pass them all.
The variable is defined at the start of the file as global operatingSystem
then later assigned a string (either osx
, win
, or linux
) when my main file gets the operating system.
However when I try to use operatingSystem
in my install
function then it just errors. Do I need to call it as global operatingSystem
inside my function? Or do I have to do something else?