Skip to content

Bug: .sdkmanrc isn’t applied when entering a subdirectory #1469

@azhuchkov

Description

@azhuchkov

Bug report

The code at this line uses:

if [[ -f .sdkmanrc ]]; then

This only checks for the presence of .sdkmanrc in the current working directory. If the user cd's into a subfolder (e.g., inside a module of a multimodule project), SDKMAN! will not detect the project's .sdkmanrc file located in a parent directory.

Steps to reproduce:

  1. Place a .sdkmanrc file in your project root.
  2. cd into a subdirectory or module.
  3. Run SDKMAN! commands that depend on .sdkmanrc.

Actual behavior:
SDKMAN! does not pick up the .sdkmanrc file.

Expected behavior:
SDKMAN! should detect .sdkmanrc from a parent directory when invoked from subfolders, similar to how tools like Git discover .git directories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions