Skip to content

Commit 37d891e

Browse files
committed
fix: 🐛 argument management
1 parent 9f8e3c5 commit 37d891e

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.devcontainer/create.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ for f in known_hosts id_rsa; do
1313
fi
1414
done
1515

16+
### Add ssh-keyscan to known_hosts
17+
sudo mkdir -p /home/vscode/.ssh
18+
sudo chmod 700 /home/vscode/.ssh
1619
ssh-keyscan github.com >>/home/vscode/.ssh/known_hosts

src/gitutils/devcontainer-feature.json

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "gitutils",
33
"name": "Git Aliases",
44
"description": "A feature to add useful Git aliases to your shell.",
5-
"version": "5.4.0",
5+
"version": "5.4.3",
66
"dependsOn": {
77
"ghcr.io/devcontainers/features/node:1": "lts",
88
"ghcr.io/tomgrv/devcontainer-features/common-utils:3": {

src/gitutils/install-config.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ eval $(
44
zz_context "$@"
55
)
66

7-
# Detect if --system flag can be used for writing
8-
if git config --system test.key test.value >/dev/null 2>&1; then
9-
GIT_CONFIG_SCOPE="--system"
10-
git config --system --unset test.key
11-
else
12-
GIT_CONFIG_SCOPE="--global"
13-
fi
7+
# Set Context
8+
GIT_CONFIG_SCOPE="--system"
149

1510
# Check if jq is installed
1611
if ! command -v jq >/dev/null 2>&1; then
@@ -42,5 +37,5 @@ fi
4237
zz_log i "Configuring scripts with {U $feature/_xx.sh}..."
4338
for script in $target/_*.sh; do
4439
alias=$(basename $script | sed -e 's/^_//g' -e 's/.sh$//g')
45-
git config $GIT_CONFIG_SCOPE alias.$alias "!sh -c '$(readlink -f $script)' -- \"\$@\"" && zz_log - "Created alias {B $alias} => {B $(readlink -f $script)}"
40+
git config $GIT_CONFIG_SCOPE alias.$alias "!sh -c '$(readlink -f $script) \"\$@\"' -- \"\$@\"" && zz_log - "Created alias {B $alias} => {B $(readlink -f $script)}"
4641
done

0 commit comments

Comments
 (0)