wso2 / wso2/reference-implementation-openhie

Potential issue iol

Open Beginner friendly
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ballerina
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Description

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

  • scrip*Resolvet directory from script path, not current shell directory.**

Using pwd makes relative paths dependent on where the command is launched. Use BASH_SOURCE[0] so service paths work consistently.

Suggested fix
-SCRIPT_DIR="$(pwd)"
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@iol/setup.sh` at line 6, Replace the current SCRIPT_DIR assignment that uses
the shell's working directory (SCRIPT_DIR="$(pwd)") with logic that derives the
script's directory from the script path (BASH_SOURCE[0]) — i.e., take
BASH_SOURCE[0], get its dirname, cd into that directory and capture the absolute
path so SCRIPT_DIR always points at the script's location regardless of where
the shell was invoked; update the assignment for SCRIPT_DIR accordingly.

Originally posted by @coderabbitai[bot] in #7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open iol/setup.sh at line 6 and inspect how SCRIPT_DIR is assigned. Run the script from a different working directory to verify that SCRIPT_DIR resolves to the script's location rather than the shell's current directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash
Domain
devops
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.