Skip to content

Commit 680433b

Browse files
fix: allow preserving absolute paths in make issue
This adds the PRESERVE_PATHS environment variable. If set, make issue will not replace /workspace and /platforms with relative paths in the generated scripts. This solves the conflict between external users needing relative paths and internal PII teams needing absolute paths. Signed-off-by: Jorge Ferreira <jorge.ferreira@precisioninno.com>
1 parent a7b0ff2 commit 680433b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

flow/util/generate-vars.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ while read -r VAR; do
5151
if [[ "${name}" == *"SCRIPTS_DIR"* ]]; then
5252
value=$(sed -e "s,${FLOW_ROOT},.,g" <<< "${value}")
5353
fi
54-
for path in workspace platforms; do
55-
value=$(sed -e "s,\(^\|[: \"']\)/${path},\1./${path},g" <<< "${value}")
56-
done
54+
55+
# PII members use PRESERVE_PATHS=1 make issue ...
56+
if [[ ! -v PRESERVE_PATHS ]]; then
57+
for path in workspace platforms; do
58+
value=$(sed -e "s,\(^\|[: \"']\)/${path},\1./${path},g" <<< "${value}")
59+
done
60+
fi
5761
value=$(sed -e "s,${FLOW_ROOT},\${FLOW_HOME},g" <<< "${value}")
5862
value=$(sed -e "s,${ORFS_ROOT},\${FLOW_HOME}/\.\.,g" <<< "${value}")
5963

0 commit comments

Comments
 (0)