akamai / cli-property-manager

Use this Property Manager CLI to automate Akamai property changes and deployments across many environments.
Apache License 2.0
29 stars 22 forks source link

akamai property-manager import fails when rule name contains special character #77

Open astoltz opened 2 years ago

astoltz commented 2 years ago

When running "akamai property-manager import" against a property, file names are created based off of the rule name. Akamai allows having an asterisks in the rule name, but Windows doesn't.

The resulting exception is:

  PM CLI error occurred:  Error: ENOENT: no such file or directory, open 'REDACTED\REDACTED\config-snippets\_en_products_*.json' Error: ENOENT: no such file or directory, open 'REDACTED\REDACTED\config-snippets\_en_products_*.json'
      at Object.openSync (node:fs:594:3)
      at Object.writeFileSync (node:fs:2207:35)
      at Utils.writeFile (C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\src\utils.js:102:12)
      at Utils.writeJsonFile (C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\src\utils.js:94:14)
      at ProjectPropertyManager.storeTemplate (C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\src\pm\project_property_manager.js:104:20)
      at ProjectPropertyManager. (C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\src\pm\project_property_manager.js:205:22)
      at C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\node_modules\underscore\underscore-node-f.cjs:716:19
      at Function.each (C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\node_modules\underscore\underscore-node-f.cjs:1328:7)
      at ProjectPropertyManager.setupPropertyTemplate (C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\src\pm\project_property_manager.js:204:15)
      at DevopsPropertyManager.importProperty (C:\Users\REDACTED\.akamai-cli\src\cli-property-manager\src\pm\devops_property_manager.js:151:23)