telefonicaid / fiware-device-simulator

Simulator of FIWARE-compatible devices (UltraLight 2.0, JSON & NGSIv2)
GNU Affero General Public License v3.0
8 stars 13 forks source link

error in resolvePath in fiwareDeviceSimulatorCLI #50

Closed alvarosainzpardo closed 4 years ago

alvarosainzpardo commented 6 years ago

Because of the implementation of this function in the case the path is relative, the configuration file can only be inside the ROOT_PATH. For example, this command is not accepted even when it is correct:

$ fiwareDeviceSimulatorCLI -c ../<dir1>/<config_file.json>

The function assumes that a relative path is always this way: ./<path> when the first character of the path is "."

AlvaroVega commented 6 years ago

According with doc:

    -c, --configuration <configuration-file-path>  Absolute or relative path (from the root of the Node application) to the device simulator configuration file (mandatory)

so if you are in ./bin you can run:

 fiwareDeviceSimulatorCLI -c ./<dir1>/<config_file.json>