Skip to content

Commit bd1a107

Browse files
committed
Shim for newest WireBox providers
1 parent acc460d commit bd1a107

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

models/EnvironmentFileService.cfc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ component singleton="true" {
1919
return deserializeJSON( envFile );
2020
}
2121

22-
return propertyFile.get()
22+
// Shim for old version of WireBox/CommandBox
23+
if( structKeyExists( propertyFile, '$get' ) ) {
24+
// WireBox >= 6
25+
var propFile = propertyFile.$get();
26+
} else {
27+
// WireBox <= 5.x
28+
var propFile = propertyFile.get();
29+
}
30+
return propFile
2331
.load( envFilePath )
2432
.getAsStruct();
2533
}

0 commit comments

Comments
 (0)