Repository navigation
setup.sh fails when run from the scripts directory #15150
geevarghesekthomas84-sys
started this conversation in
OpenProblems - Community
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
Running
./setup.shfrom thescriptsdirectory fails because the script resolves paths relative to the current working directory.Steps to reproduce
cd hyperswitch/scripts ./setup.shActual behavior
Expected behavior
The setup script should work when launched from either the repository root or the
scriptsdirectory.Cause
The script references
scripts/notify_scarf.shrelative to the current directory. When launched insidescripts, it looks forscripts/scripts/notify_scarf.sh.Other repository-relative paths, such as
config/docker_compose.toml, are also affected.Suggested fix
Add this immediately after
set -Eeuo pipefailinscripts/setup.sh:This sets the working directory to the repository root before the script accesses repository-relative paths.
Workaround
Run setup from the repository root:
cd hyperswitch ./scripts/setup.shAll reactions