Skip to content

Commit 190ccd8

Browse files
fix: CWD in script
1 parent 3512332 commit 190ccd8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

benchmark/scripts/run_single_benchmark.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ function docker_compose_up() {
1515

1616
# Adjust the SQLite connection string to use absolute path
1717
function adjust_sqlite_connection_string() {
18+
sed_pattern="s|Data Source=\([^;]*\.db\);|Data Source=$(pwd)/\1;|"
1819
if [[ "$OSTYPE" == "darwin"* ]]; then
19-
sed -i '' "s|Data Source=\([^;]*\.db\);|Data Source=$working_directory/\1;|" .env
20+
sed -i '' "$sed_pattern" .env
2021
else
21-
sed -i "s|Data Source=\([^;]*\.db\);|Data Source=$($working_directory)/\1;|" .env
22+
sed -i "$sed_pattern" .env
2223
fi
2324
}
2425

0 commit comments

Comments
 (0)