File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ prompt_value() {
4444 printf ' %s: ' " $label " >&2
4545 fi
4646
47- IFS= read -r value
47+ if ! IFS= read -r value; then
48+ fail " could not read $label from terminal"
49+ fi
4850 if [ -z " $value " ]; then
4951 value=" $default_value "
5052 fi
@@ -59,7 +61,11 @@ prompt_secret() {
5961 printf ' %s: ' " $label " >&2
6062 old_stty=" $( stty -g) "
6163 stty -echo
62- IFS= read -r value
64+ if ! IFS= read -r value; then
65+ stty " $old_stty "
66+ printf ' \n' >&2
67+ fail " could not read $label from terminal"
68+ fi
6369 stty " $old_stty "
6470 printf ' \n' >&2
6571 printf ' %s' " $value "
@@ -136,6 +142,8 @@ load_if_present "$config_path"
136142unset INFISICAL_MACHINE_IDENTITY INFISICAL_CLIENT_ID INFISICAL_CLIENT_SECRET
137143load_if_present " $machine_config_path "
138144
145+ printf ' Configuring Infisical devbox machine auth. Press Enter to accept defaults.\n' >&2
146+
139147infisical_domain=" $( prompt_value " Infisical domain" " ${INFISICAL_DOMAIN:- https:// eu.infisical.com/ api} " ) "
140148infisical_project_id=" $( prompt_value " Infisical project ID" " ${INFISICAL_PROJECT_ID:- } " ) "
141149infisical_env=" $( prompt_value " Infisical env" " ${INFISICAL_ENV:- dev} " ) "
You can’t perform that action at this time.
0 commit comments