properties
properties copied to clipboard
can not read from another path
Hi,
I'm having an issue when reading a properties file from another path relative to the caller on a Windows machine. Or in other words: I can only use the same path where the script is, which uses the properties file.
//works: var properties = PropertiesReader('gradle.properties');
//the following combinations don't work: var properties = PropertiesReader('./props/gradle.properties'); var properties = PropertiesReader('props\gradle.properties'); var properties = PropertiesReader('.\props\gradle.properties'); var properties = PropertiesReader('../gradle.properties');
My machine runs Windows 7 with NodeJs in version 2.14.7 and properties-reader 0.0.15
The library uses the absolute path, at the moment you cannot make use of relative paths.
You must use ... propertiesPath = path.join (__ dirname, '\{path_And_Filename.properties}\'); var properties = PropertiesReader(propertiesPath);