Commit 7613bf1
committed
Fix filename variable substitution to strip any extension
When using ${modelName} or ${specName} in TLC custom options, the
variables now correctly resolve to the base filename without extension,
regardless of whether the file has a .cfg or .tla extension.
Previously, path.basename(file, '.ext') would only strip the specified
extension, causing ${modelName}.dot to expand to "Model.tla.dot" when
the config was embedded in a .tla file instead of the expected
"Model.dot".
Now using path.parse(file).name which properly strips any extension.
Fixes Github issue #483
#483
[Bug]
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>1 parent 8a3409b commit 7613bf1
2 files changed
+30
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
488 | | - | |
| 487 | + | |
| 488 | + | |
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
106 | 134 | | |
107 | 135 | | |
108 | 136 | | |
| |||
0 commit comments