File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ Modules 5.1.1 (not yet released)
2222* Remove the *already loaded * message displayed when verbosity level is higher
2323 or equal to ``verbose2 `` if new tags are applied to the loaded module. (fix
2424 issue #456)
25+ * Report a global known error when current working directory cannot be
26+ retrieved due to the removal of this directory. (fix issue #457)
2527
2628
2729Modules 5.1.0 (2022-04-30)
Original file line number Diff line number Diff line change @@ -76,7 +76,11 @@ proc getAbsolutePath {path} {
7676 } else {
7777 # register pwd at first call
7878 if {![isStateDefined cwd]} {
79- setState cwd [pwd ]
79+ # raise a global known error if cwd cannot be retrieved (especially
80+ # when this directory has been removed)
81+ if {[catch {setState cwd [pwd ]} errorMsg]} {
82+ knerror $errorMsg
83+ }
8084 }
8185 set curdir [getState cwd]
8286 }
You can’t perform that action at this time.
0 commit comments