Skip to content

Commit 664384d

Browse files
committed
fix: don't it ' in the environment var
1 parent 4c36fc3 commit 664384d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.vscode/env.zsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function safe_name() {
6464
function update_host_to_env() {
6565
if [[ -x "$(command -v yq)" && -d "${PROJECT_FOLDER}/hosts" ]]; then
6666
for ur in ${(@f)"$(ls -1 ${PROJECT_FOLDER}/hosts)"}; do
67-
local file="'${PROJECT_FOLDER}/hosts/${ur}/${ur}.md'"
67+
local file="${PROJECT_FOLDER}/hosts/${ur}/${ur}.md"
6868
if [ -f "$file" ]; then
6969
local host_data=$(cut_lines_from_markdown_codes "$file" "yaml host")
7070

@@ -124,10 +124,10 @@ function set_current_host() {
124124
function update_user_cred_to_env() {
125125
if [[ -x "$(command -v yq)" && -d "${PROJECT_FOLDER}/users" ]]; then
126126
for ur in ${(@f)"$(ls -1 ${PROJECT_FOLDER}/users)"}; do
127-
local file="'${PROJECT_FOLDER}/users/${ur}/${ur}.md'"
127+
local file="${PROJECT_FOLDER}/users/${ur}/${ur}.md"
128128
if [ -f "$file" ]; then
129129
local usercred=$(cut_lines_from_markdown_codes "$file" "yaml credentials")
130-
130+
131131
local user=$(echo "$usercred" | yq '.[0].user' -r)
132132
local _var=$(safe_name "$user") # replace . and - with _ to avoid env var issues
133133
local pass=$(echo "$usercred" | yq '.[0].password' -r)

0 commit comments

Comments
 (0)