Skip to content

[#7617] improvement(cli): ADD Error handling and absolute path resolution in gcli.sh #7620

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

Closed
wants to merge 0 commits into from

Conversation

su8y
Copy link
Contributor

@su8y su8y commented Jul 9, 2025

What changes were proposed in this pull request?

  • Added set -e to ensure the script exits immediately upon any command failure.

  • Resolved the bin directory path to an absolute path to ensure consistent behavior regardless of the script's invocation location.

  • Implemented proper error handling when the CLI_JAR is missing or not found, with a clear and informative error message.

Why are the changes needed?

Fix: #7617

Does this PR introduce any user-facing change?

  • If the CLI JAR is missing, users will now see a clear error message.

  • The CLI script will behave consistently, even when executed from different directories.

How was this patch tested?

  • Manually ran the updated gcli.sh script with and without the CLI JAR present.

  • Verified the script terminates correctly with an error when the JAR is missing.

  • Confirmed the correct JAR is found and launched when present, from various working directories.

@su8y su8y marked this pull request as draft July 9, 2025 03:47
@su8y su8y marked this pull request as ready for review July 9, 2025 03:48
@jerryshao
Copy link
Contributor

I think this clients/cli/bin/gcli.sh is not used anymore, we can actually remove this script. WDYT? @Abyss-lord

@Abyss-lord
Copy link
Collaborator

I think this clients/cli/bin/gcli.sh is not used anymore, we can actually remove this script. WDYT? @Abyss-lord

Yes, clients/cli/bin/gcli.sh is no longer in use and can be safely removed. Thanks for pointing it out.

@justinmclean
Copy link
Member

@su8y you can chenge the PR/raise another to remove the file if you want

@su8y
Copy link
Contributor Author

su8y commented Jul 12, 2025

@su8y원하시면 PR을 변경하거나 다른 파일을 제거하도록 요청할 수 있습니다.

Thanks!! I’ll check it out.

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

Successfully merging this pull request may close these issues.

[Improvement] Update gcli.sh to check to have error handling if the jar cannot be found
4 participants