I am using this command in latex to specify the font path:
\setmainfont[Color=primary, Path = fonts/source-han-serif/,BoldItalicFont=SourceHanSerifSC-Bold,BoldFont=SourceHanSerifSC-Bold,ItalicFont=SourceHanSerifSC-Bold]{SourceHanSerifSC-Regular}
now I have a issue that, I have many cls files that contains the font path, if I want to change the file path, I have to open each cls file and edit one by one. is it possible to make setmainfont to read the environment that I can specify the font path in one place? my possible operation system is Ubuntu and macOS.

kpsewhich -progname=lualatex -show-path=.otf– cabohah Jun 17 '23 at 12:33