Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install script stopped working because of broken symlink #368

Open
sunghospark-calm opened this issue May 4, 2021 · 3 comments
Open

install script stopped working because of broken symlink #368

sunghospark-calm opened this issue May 4, 2021 · 3 comments

Comments

@sunghospark-calm
Copy link

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.

@uriel-sf
Copy link

uriel-sf commented Aug 5, 2021

👍

@uriel-sf
Copy link

uriel-sf commented Aug 5, 2021

Seeing the same issue. Is there a workaround?

@uriel-sf
Copy link

uriel-sf commented Aug 5, 2021

workaround is to manually download the install script, and replace the releaseTag definition (which does not parse properly) with the latest tag... currently, it is v2.0.5. So:

# download
$ curl https://raw.githubusercontent.com/oktadeveloper/okta-aws-cli-assume-role/master/bin/install.sh > install.sh
# replace definition of releaseTag w/ following in install.sh:
releaseTag=v2.0.5
# proceed w/ install
$ PREFIX=~/.okta bash install.sh -i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants