Skip to content

Commit e497be6

Browse files
committed
fix: 🐛 update commit retrieval method to ensure valid sha
1 parent ccd1bd1 commit e497be6

3 files changed

Lines changed: 2 additions & 17 deletions

File tree

src/gateway/configure-wrapper.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ set -eu
55
#### Goto repository root
66
cd "$(git rev-parse --show-toplevel)" >/dev/null
77

8-
GATEWAY_SOURCE=".devcontainer/.gateway/gateway-curl.sh"
9-
CURLRC_SOURCE=".devcontainer/.gateway/root/.curlrc"
8+
GATEWAY_SOURCE="$source/_gateway-curl.sh"
109
GATEWAY_TARGET="/usr/local/bin/gateway-curl"
1110
CURL_BIN="/usr/bin/curl"
1211
CURL_REAL_BIN="/usr/bin/curl.real"
@@ -26,11 +25,6 @@ if [ ! -f "$GATEWAY_SOURCE" ]; then
2625
exit 1
2726
fi
2827

29-
if [ ! -f "$CURLRC_SOURCE" ]; then
30-
zz_log e "Missing curl configuration: {U $CURLRC_SOURCE}"
31-
exit 1
32-
fi
33-
3428
if [ -z "$CURRENT_HOME" ] || [ ! -d "$CURRENT_HOME" ]; then
3529
zz_log e "Could not resolve home directory for user: {U $CURRENT_USER}"
3630
exit 1
@@ -51,9 +45,5 @@ else
5145
run_as_root ln -sfn "$GATEWAY_TARGET" "$CURL_BIN"
5246
fi
5347

54-
zz_log i "Installing curl configuration to {U $CURRENT_HOME/.curlrc}"
55-
run_as_root install -m 644 "$CURLRC_SOURCE" "$CURRENT_HOME/.curlrc"
56-
run_as_root chown "$CURRENT_USER":"$(id -gn "$CURRENT_USER")" "$CURRENT_HOME/.curlrc"
57-
5848
zz_log s "Gateway curl wrapper configured for {U $CURRENT_USER}"
5949

src/gateway/stubs/.devcontainer/devcontainer.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/gitutils/_git-getcommit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ if [ -z "$sha" ]; then
2626
fi
2727

2828
#### Display commit to fixup, keep only the sha, remove new line
29-
echo $sha | cut -d' ' -f1 | tr -d '\n'
29+
git rev-parse --verify "$sha^{commit}" | cut -d' ' -f1 | tr -d '\n'

0 commit comments

Comments
 (0)