Hello,
Just to let you now that I have made a fix few days ago to trim the
function body passed to the `set-function` modulefile command [1]. So now
everything works as expected even if the declared function body ends with
some trailing space or newline characters.
That fix will be shipped in next v4.2 bugfix release (v4.2.2).
Regards,
Xavier
[1]
https://github.com/cea-hpc/modules/commit/ef576c5fd9e0e3c3e17e9ce38800bddd79cc58bd
Le mar. 18 déc. 2018 à 15:29, Pierre Girard <pie...@ge...> a
écrit :
> Hello again,
>
> I think I figured it out. If I do this:
>
>
>
> #%Module
> set-function conda {
> if [ "$#" -lt 1 ]; then
> echo "Missing arguments"
> else
> echo "Ok"
> fi
>
> }
>
> I get an error. If I do this :
>
>
>
> #%Module
> set-function conda {
> if [ "$#" -lt 1 ]; then
> echo "Missing arguments"
> else
> echo "Ok"
> fi}
>
> It works correctly. So it seems that the closing brace of the function has
> to be on the last line of bash code (or any other shell I presume).
>
> Thanks for all your help.
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
|