rockcarver / frodo-cli

A CLI to manage ForgeRock platform deployments supporting Identity Cloud tenants, ForgeOps deployments, and classic deployments.
MIT License
17 stars 14 forks source link

Script import fails silently if script name is not included in command line #278

Closed TomWoodFR closed 8 months ago

TomWoodFR commented 1 year ago

Frodo CLI version

Provide output of frodo -v

% frodo -v
You are running the binary release.
Installed versions:
cli: v1.0.1
lib: v1.1.0
node: v18.5.0

Describe the issue

When importing a script (e.g. an Access Token Modification Script) which was exported from another environment, the import silently fails without notification. When specifying the name via the -n parameter, the import completes successfully.

The original exported script has the name in the exported file under script.[_id].name which should be implied as the value for -n when importing without specifying.

When running the import only the following is returned:

% frodo script import -f Alpha-Access-Token-modification-Script.script.json box2 alpha
Connected to https://[Environment]/am [alpha] as service account tom-wood-frodo [fc03e564-5687-44d0-aa9d-15994cbd8161]

When using --curlirize, there is no REST PUT against the script endpoint to update the file. After adding the -n parameter, the PUT commands are shown and executed as expected.

vscheuber commented 8 months ago

@TomWoodFR this has been fixed in the Frodo CLI 2.x branch for a while now.