Skip to content

Commit bb8ac18

Browse files
committed
fix stderr redirection for .cshrc
1 parent 90f3e8d commit bb8ac18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/scripts/test_init_scripts.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ for shell in ${SHELLS[@]}; do
4141
# we work around this by creating a temporary .cshrc file (which sources
4242
# the init script), and then use a here-string to specify the command to
4343
# be run; the output is then processed as for other shells
44-
echo "source init/lmod/$shell 2> /dev/null" > ~/.cshrc
44+
echo "source init/lmod/$shell >& /dev/null" > ~/.cshrc
4545
cat ~/.cshrc
4646
$shell -l <<< "alias" 2> /dev/null
4747
MODULE_SECTIONS=($($shell -l <<< "module ov" 2>&1 | grep -e '---'))
@@ -55,7 +55,7 @@ for shell in ${SHELLS[@]}; do
5555
# Test 4: Load EasyBuild module and check version
5656
# eb --version outputs: "This is EasyBuild 5.1.1 (framework: 5.1.1, easyblocks: 5.1.1) on host ..."
5757
if [ "$shell" = "csh" ]; then
58-
echo "source init/lmod/$shell 2> /dev/null" > ~/.cshrc
58+
echo "source init/lmod/$shell >& /dev/null" > ~/.cshrc
5959
cat ~/.cshrc
6060
$shell -l <<< "alias" 2> /dev/null
6161
command="$shell -l <<< 'module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; eb --version | cut -d \" \" -f4'"
@@ -65,7 +65,7 @@ for shell in ${SHELLS[@]}; do
6565
assert "$command" "$EXPECTED_EASYBUILD_VERSION"
6666
# Test 5: Load EasyBuild module and check path
6767
if [ "$shell" = "csh" ]; then
68-
echo "source init/lmod/$shell 2> /dev/null" > ~/.cshrc
68+
echo "source init/lmod/$shell >& /dev/null" > ~/.cshrc
6969
cat ~/.cshrc
7070
$shell -l <<< "alias" 2> /dev/null
7171
EASYBUILD_PATH=$($shell -l <<< "module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; which eb")

0 commit comments

Comments
 (0)