Skip to content

Use ada/etc/ada.conf if it exists #63

Merged
onnozweers merged 3 commits intomasterfrom
18-config-in-script-dir
Feb 18, 2025
Merged

Use ada/etc/ada.conf if it exists #63
onnozweers merged 3 commits intomasterfrom
18-config-in-script-dir

Conversation

@hailihu
Copy link
Contributor

@hailihu hailihu commented Feb 18, 2025

Tell Ada to look for an ada.conf in the same dir as where the script is (last in order of preference after /etc/ada.conf and ~/.ada/ada.conf).

Not that $debug is always false when ada.conf is sourced, because the env variables and commandline arguments are set later. So I removed the line:

$debug && echo "Loading $configfile"

@hailihu hailihu requested a review from onnozweers February 18, 2025 11:45
@hailihu hailihu linked an issue Feb 18, 2025 that may be closed by this pull request
@hailihu hailihu added the enhancement New feature or request label Feb 18, 2025
Copy link
Contributor

@onnozweers onnozweers left a comment

Choose a reason for hiding this comment

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

Hi Haili,

Two comments:

  • "dcachetest" turned back to "dolphin12" in the example ada.conf
  • In the help text, you refer to ./etc/ada.conf. . in Linux means "the current working directory" and not the directory where the ada executable is stored. So, to avoid confusion, I'd like to suggest to rephrase this and perhaps use <scriptdir>/etc/ada.conf or {scriptdir}/etc/ada.conf as an alternative in the helptext.

@hailihu
Copy link
Contributor Author

hailihu commented Feb 18, 2025

Hi Haili,

Two comments:

* "dcachetest" turned back to "dolphin12" in the example ada.conf

* In the help text, you refer to `./etc/ada.conf`. `.` in Linux means "the current working directory" and not the directory where the ada executable is stored. So, to avoid confusion, I'd like to suggest to rephrase this and perhaps use `<scriptdir>/etc/ada.conf` or `{scriptdir}/etc/ada.conf` as an alternative in the helptext.

Thanks, done.

@onnozweers
Copy link
Contributor

Thanks! Merging.

@onnozweers onnozweers merged commit 67f95ce into master Feb 18, 2025
1 check passed
@hailihu hailihu deleted the 18-config-in-script-dir branch February 19, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ada: look for config file in ada script dir

2 participants