Skip to content

Commit

Permalink
LDEV-4982 {add lucee-config-file}
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jul 4, 2024
1 parent e9cf28d commit 5e59743
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/lucee/runtime/config/ConfigWebUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ public static String replacePlaceholder(String str, Config config) {
if (str.startsWith("}", 13)) str = checkResult(str, config.getConfigDir().getReal(str.substring(14)));
else if (str.startsWith("-dir}", 13)) str = checkResult(str, config.getConfigDir().getReal(str.substring(18)));
else if (str.startsWith("-directory}", 13)) str = checkResult(str, config.getConfigDir().getReal(str.substring(24)));
else if (str.startsWith("-file}", 13)) str = checkResult(str, config.getConfigFile().getReal(str.substring(19)));
}

else if (config != null && str.startsWith("{lucee-server")) {
Expand Down
15 changes: 15 additions & 0 deletions test/tickets/LDEV4982.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
component extends="org.lucee.cfml.test.LuceeTestCase" {

function run( testResults , testBox ) {
describe( "Test case for LDEV-4982", function() {
it( title = "Checking {lucee-config-file}", body=function( currentSpec ) {
var cfconfigPath = expandPath( "{lucee-config-file}" );
systemOutput(chr(10) & cfconfigPath, true)
expect( fileExists( cfconfigPath ) ).toBeTrue();
var json= fileRead( cfconfigPath );
expect( isJson( json ) ).toBeTrue();
});
});
}

}

0 comments on commit 5e59743

Please sign in to comment.