Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backtick is not working in Modules Release Tcl 1.578 #365

Closed
balaramr opened this issue Oct 19, 2020 · 1 comment
Closed

Backtick is not working in Modules Release Tcl 1.578 #365

balaramr opened this issue Oct 19, 2020 · 1 comment

Comments

@balaramr
Copy link

Backtick is not working in Modules Release Tcl 1.578

Modules version and configuration -- Modules Release Tcl 1.578

$ > module --version
Modules Release Tcl 1.578
$ >

To Reproduce Error and debugging information

Steps to reproduce the behavior:

$ > vi opensource 
Copyright (C) 2009-2018. All rights reserved.
#%Module

prepend-path	PATH	/opt/opensource/bin
prepend-path	LD_LIBRARY_PATH	/opt/opensource/lib64:
setenv		CURRENT_DIR	`pwd`
$ > module load opensource
$ > echo $CURRENT_DIR
`pwd`
$ > 

In direct shell

If we try this directly in shell backtick is working fine.

$ > setenv  CURRENT_DIR  `pwd`
$ > echo $CURRENT_DIR
/home/john
$ > 

Working -- Modules Release Tcl 3.1.6

Same thing is working in other module version

$ > module --version
Modules Release Tcl 3.1.6
$ >

Working in Module 3.1.6 version

$ > module load opensource
$ > echo $CURRENT_DIR
/home/john
$ > 
@balaramr balaramr added the bug label Oct 19, 2020
@xdelaruelle
Copy link
Member

Backticks are now escaped to be used in environment variable values or in shell alias or shell function definition. This applies to Modules-Tcl but also to newer version of Modules, starting version 4.0.

To achieve the backtick shell mechanism when defining an environment variables, the exec Tcl command has to be used:

setenv		CURRENT_DIR	[exec pwd]

I will clarify this change in the diff v3 v4 document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants