From d9fbdfbee930c9bae5c4c007bfb6a844ffdb0744 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Wed, 19 Jul 2023 17:57:37 +0200 Subject: modules: use curly braces to enclose value in Tcl modulefile (#38375) Use curly braces instead of quotes to enclose value or text in Tcl modulefile. Within curly braces Tcl special characters like [, ] or $ are treated verbatim whereas they are evaluated within quotes. Curly braces is Tcl recommended way to enclose verbatim content [1]. Note: if curly braces charaters are used within content, they must be balanced. This point has been checked against current repository and no unbalanced curly braces has been spotted. Fixes #24243 [1] https://wiki.tcl-lang.org/page/Tcl+Minimal+Escaping+Style --- .../builtin.mock/packages/module-long-help/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin.mock/packages/module-long-help/package.py (limited to 'var') diff --git a/var/spack/repos/builtin.mock/packages/module-long-help/package.py b/var/spack/repos/builtin.mock/packages/module-long-help/package.py new file mode 100644 index 0000000000..43a0da412a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/module-long-help/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class ModuleLongHelp(Package): + """Package to test long description message generated in modulefile. + Message too long is wrapped over multiple lines.""" + + homepage = "http://www.llnl.gov" + url = "http://www.llnl.gov/module-long-help-1.0.tar.gz" + + version("1.0", "0123456789abcdef0123456789abcdef") + + def setup_run_environment(self, env): + env.set("FOO", "bar") -- cgit v1.2.3-70-g09d2