Add error handling if infisical-dcli is used
This commit is contained in:
5
dist/scripts/src/fetch-secrets.sh
vendored
5
dist/scripts/src/fetch-secrets.sh
vendored
@@ -26,7 +26,10 @@ fetch_secret() {
|
|||||||
|
|
||||||
if command -v infisical-dcli &>/dev/null; then
|
if command -v infisical-dcli &>/dev/null; then
|
||||||
# If infisical CLI command is available, use it directly
|
# If infisical CLI command is available, use it directly
|
||||||
infisical-dcli "${args[@]}" >"${output_file}"
|
if ! infisical-dcli "${args[@]}" >"${output_file}"; then
|
||||||
|
rm -f "${output_file}" # Clean up if fetch failed
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if ! dc_infisical "${args[@]}" >"${output_file}"; then
|
if ! dc_infisical "${args[@]}" >"${output_file}"; then
|
||||||
rm -f "${output_file}" # Clean up if fetch failed
|
rm -f "${output_file}" # Clean up if fetch failed
|
||||||
|
|||||||
Reference in New Issue
Block a user