Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 473
    • Issues 473
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2458
Closed
Open
Issue created May 05, 2022 by David Ludlow@DL

unset csh environment variables when sourcing cshrc twice

Summary

In a c-shell if sourcing ~OpenFOAM/OpenFOAM-v2112/etc/cshrc MORE THAN ONCE, the OpenFOAM paths are missing from the environment variable $PATH and so OpenFOAM code will no longer operate.

Steps to reproduce

> source ~OpenFOAM/OpenFOAM-v2112/etc/cshrc
> echo $PATH     
> source ~OpenFOAM/OpenFOAM-v2112/etc/cshrc 
> echo $PATH

Example case

What is the current bug behaviour?

OpenFOAM paths are missing from $PATH

What is the expected correct behavior?

OpenFOAM paths are in $PATH

Relevant logs and/or images

Environment information

  • OpenFOAM version :v2112 (and possibly earlier)
  • Operating system : centos or any (presumably)
  • Hardware info :
  • Compiler :gcc or any (presumably)

Possible fixes

In etc/config.csh/setup there are two occurrences of the following three lines:

_foamClean PATH "$foamOldDirs"
_foamClean MANPATH "$foamOldDirs"
_foamClean -lib "$foamOldDirs"

If you replace the second occurrence by

_foamClean PATH
_foamClean MANPATH
_foamClean -lib

This fixes the issue.

Assignee
Assign to
Time tracking