Skip to content

Commit 1a722b8

Browse files
authored
Add quotes in command (#467)
1 parent 7f64ecf commit 1a722b8

File tree

18 files changed

+399
-507
lines changed

18 files changed

+399
-507
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: CI
33

44
env:
55
WSLENV: "HELM_SECRETS_BACKEND:BATS_REPORT_FILENAME:BATS_TEST_NAME_PREFIX"
6-
VERSION_HELM: v3.12.3
7-
VERSION_SOPS: v3.8.1
8-
VERSION_VALS: v0.26.2
6+
VERSION_HELM: v3.15.3
7+
VERSION_SOPS: v3.9.0
8+
VERSION_VALS: v0.37.3
99

1010
on:
1111
pull_request:
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
if: "!contains(github.event.head_commit.message, '[ci skip]')"
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- name: Run the sh-checker
2525
uses: luizm/[email protected]
2626
env:
@@ -133,7 +133,7 @@ jobs:
133133
# this is to fix https://github.com/actions/checkout/issues/760
134134
- run: git config --global --add safe.directory /__w/helm-secrets/helm-secrets
135135

136-
- uses: actions/checkout@v3
136+
- uses: actions/checkout@v4
137137
with:
138138
submodules: true
139139

@@ -178,19 +178,14 @@ jobs:
178178
run: wsl bash -c 'apt-get update -qq && apt-get install -yqq parallel'
179179

180180
- name: Print Environment
181+
continue-on-error: true
181182
run: |-
182183
bash -c 'echo "Shell: $(readlink /bin/sh || readlink /var/select/sh || echo unknown)"'
183184
bash tests/bats/core/bin/bats -v
184185
sops --version
185186
gpg --version
186187
vals version
187188
188-
- name: Print Environment (Windows)
189-
if: "contains(matrix.os, 'windows-latest')"
190-
run: |-
191-
scripts/wrapper/sh.cmd --version
192-
scripts/wrapper/sh.cmd -c -- "uname -a"
193-
194189
- name: Run helm-secrets w/o bats
195190
run: |-
196191
helm plugin install "${{ github.event_name == 'pull_request'
@@ -232,7 +227,7 @@ jobs:
232227
BATSLIB_TEMP_PRESERVE: "0"
233228
BATSLIB_TEMP_PRESERVE_ON_FAILURE: "0"
234229
steps:
235-
- uses: actions/checkout@v3
230+
- uses: actions/checkout@v4
236231
with:
237232
submodules: true
238233
fetch-depth: 0
@@ -321,7 +316,7 @@ jobs:
321316

322317
- run: kubectl cluster-info
323318

324-
- uses: actions/checkout@v3
319+
- uses: actions/checkout@v4
325320
with:
326321
submodules: true
327322

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
permissions:
1414
contents: write
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- name: Package helm-secrets
1919
run: tar --transform 's,^,helm-secrets/,' --exclude=contrib --exclude=examples --exclude=tests --exclude=helm-secrets.tar.gz -zcvf helm-secrets.tar.gz *
@@ -37,7 +37,7 @@ jobs:
3737
contents: write
3838
pull-requests: write
3939
steps:
40-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v4
4141

4242
- run: >-
4343
sed -i 's/HELM_SECRETS_VERSION=".*"/HELM_SECRETS_VERSION="'${GITHUB_REF_NAME/v}'"/g' docs/ArgoCD\ Integration.md

.github/workflows/wiki.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v4
1717
with:
1818
repository: ${{ github.repository }}.wiki
1919
path: wiki

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ Run decrypted command on specific value files.
3737
This method is preferred over the plugin command below.
3838
This mode is used in [ArgoCD](https://github.com/jkroepke/helm-secrets/wiki/ArgoCD-Integration) environments.
3939

40-
On Windows, the command `helm secrets patch windows` needs to be run first.
41-
4240
```bash
4341
helm upgrade name . -f secrets://secrets.yaml
4442
```

docs/Usage.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Available Commands:
1515
decrypt Decrypt secrets file
1616
edit Edit secrets file and encrypt afterwards
1717
dir Get plugin directory
18-
patch Enables windows specific adjustments
1918
<cmd> wrapper that decrypts encrypted yaml files before running helm <cmd>
2019
2120
Available Options:

plugin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ useTunnel: false
77
command: "$HELM_PLUGIN_DIR/scripts/run.sh"
88
platformCommand:
99
- os: windows
10-
command: "cmd /c $HELM_PLUGIN_DIR\\scripts\\wrapper\\sh.cmd $HELM_PLUGIN_DIR\\scripts\\run.sh"
11-
#command: "powershell -noprofile -executionpolicy bypass -file $HELM_PLUGIN_DIR\\scripts\\wrapper\\sh.ps1 $HELM_PLUGIN_DIR\\scripts\\run.sh"
10+
command: >-
11+
cmd /c $HELM_PLUGIN_DIR\scripts\wrapper\run.cmd
1212
1313
downloaders:
1414
- command: "scripts/run.sh downloader"

scripts/commands/help.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Available Commands:
1717
decrypt Decrypt secrets file
1818
edit Edit secrets file and encrypt afterwards
1919
dir Get plugin directory
20-
patch Enables windows specific adjustments
2120
<cmd> wrapper that decrypts encrypted yaml files before running helm <cmd>
2221
2322
Available Options:

scripts/commands/patch.sh

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

scripts/lib/common.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ CYGWIN* | MINGW64_NT*)
107107
fi
108108
}
109109
_helm_winpath() { _winpath "$@"; }
110+
111+
_sed_i 's! - command: .*! - command: "scripts/wrapper/run.cmd downloader"!' "${HELM_PLUGIN_DIR}/plugin.yaml"
110112
;;
111113
Darwin)
112114
case $(sed --help 2>&1) in
@@ -133,3 +135,7 @@ Darwin)
133135
fi
134136
;;
135137
esac
138+
139+
if on_wsl || on_cygwin; then
140+
_sed_i 's! - command: .*! - command: "scripts/wrapper/run.cmd downloader"!' "${HELM_PLUGIN_DIR}/plugin.yaml"
141+
fi

scripts/run.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ if [ "${LOAD_GPG_KEYS}" != "false" ]; then
7979
fi
8080

8181
if [ -n "${HELM_SECRET_WSL_INTEROP+x}" ]; then
82-
shift
8382
argc=$#
8483
j=0
8584

@@ -158,13 +157,6 @@ while true; do
158157
downloader "$2" "$3" "$4" "$5"
159158
break
160159
;;
161-
patch)
162-
# shellcheck source=scripts/commands/patch.sh
163-
. "${SCRIPT_DIR}/commands/patch.sh"
164-
165-
patch "$2"
166-
break
167-
;;
168160
--help | -h | help)
169161
# shellcheck source=scripts/commands/help.sh
170162
. "${SCRIPT_DIR}/commands/help.sh"

0 commit comments

Comments
 (0)