Hi Bhargav,
Currently the best option is to manually add unset-function commands
after the source-sh command.
I have created a feature request to add some option to source-sh to be
able to skip specific environment changes:
https://github.com/cea-hpc/modules/issues/503
Regards,
Xavier
Le mar. 27 juin 2023 à 03:30, Bhargav Katkam via Modules-interest
<mod...@li...> a écrit :
>
> Micron Confidential
>
>
> Hi Team,
>
> I am trying to source an externally managed bash script using ‘source-sh’ command in a module file.
>
> But it also exports functions defined in that file, while I am interested only in environment variables.
>
> I can try ‘unset-function’ but it’s hard to keep track of function definition changes.
>
>
>
> How to achieve this.
>
>
>
> --
>
> Bhargav
>
>
>
>
> Micron Confidential
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
|