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

Load "shared" config files relative to executable #75

Merged
merged 3 commits into from
Mar 13, 2024

Conversation

noizwaves
Copy link
Contributor

Following on #74, this PR updates scope to also search for config files relative to it's current executable path.

Testing

I was able to verify this change manually with a debug build locally.

Shared config is present

❯ tree ~/workspace/gusto_scope_config
/Users/adam.neumann/workspace/gusto_scope_config
├── bin
│   └── scope
└── etc
    └── scope
        └── homebrew.yaml

❯ ~/workspace/gusto_scope_config/bin/scope doctor list
 INFO Available checks that will run
 INFO   Name                       Description                                                 Path
 INFO - ScopeDoctorGroup/homebrew  Homebrew                                                    ../gusto_scope_config/bin/../etc/scope/homebrew.yaml

Shared config is missing

/Users/adam.neumann/workspace/gusto_scope_config
├── bin
│   └── scope
└── etc

❯ ~/workspace/gusto_scope_config/bin/scope doctor list
 INFO Available checks that will run
 INFO   Name                  Description                                                 Path

@noizwaves noizwaves marked this pull request as ready for review March 13, 2024 21:51
@noizwaves noizwaves requested a review from ethankhall March 13, 2024 21:51
Copy link
Contributor

@ethankhall ethankhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update the "file location" to canonicalize the path, to remove the extra ../

@noizwaves
Copy link
Contributor Author

We should update the "file location" to canonicalize the path, to remove the extra ../

I noticed that as well, I can circle back with that improvement 👍

@noizwaves noizwaves merged commit 1daa5a3 into main Mar 13, 2024
12 checks passed
@noizwaves noizwaves deleted the an--load-shared-config branch March 13, 2024 23:55
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.

2 participants