okta-aws-cli-assume-role icon indicating copy to clipboard operation
okta-aws-cli-assume-role copied to clipboard

install script stopped working because of broken symlink

Open sunghospark-calm opened this issue 3 years ago • 3 comments

Describe the bug install.sh is not correctly grabbing the release tag, which makes the download of the correct jar file and symlink to fail. Any okta command from that point fails with this error.

Okta Password:
Error: Could not find or load main class com.okta.tools.WithOkta
Caused by: java.lang.ClassNotFoundException: com.okta.tools.WithOkta
Error: Could not find or load main class com.okta.tools.WithOkta
Caused by: java.lang.ClassNotFoundException: com.okta.tools.WithOkta

To Reproduce Steps to reproduce the behavior:

  1. Download the install.sh file, wget https://github.com/oktadev/okta-aws-cli-assume-role/blob/master/bin/install.sh
  2. Run the install script, sudo bash ./install.sh
  3. check the output or run okta commands after installation.
  4. You will see the broken symlink on the jar file.
❯ sudo bash install.sh -i
Installing into ~/.okta
Latest release JAR file: https://github.com/oktadeveloper/okta-aws-cli-assume-role/releases/download//okta-aws-cli-.jar
Fetching JAR file → ~/.okta/okta-aws-cli-.jar
Symlinking ~/.okta/okta-aws-cli.jar → okta-aws-cli-.jar
Creating example ~/.okta/config.properties

Notice the missing release tag after okta-aws-cli-

Expected behavior Install script should install the correct jar.

Additional context https://github.com/oktadev/okta-aws-cli-assume-role/blob/master/bin/install.sh#L83 this line here seems to be returning latest instead of the release tag.

sunghospark-calm avatar May 04 '21 19:05 sunghospark-calm