Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/command_collector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ _command_collector()
| while IFS= read __cc_line && [ -n "${__cc_line}" ]; do

# replace %line% by __cc_line value
__cc_new_command=`echo "${__cc_command}" | sed -e "s|%line%|${__cc_line}|g"`
__cc_new_command=`echo "${__cc_command}" | sed -e "s|%line%|\"${__cc_line}\"|g" -e "s|\"\"|\"|g"`
__cc_new_output_directory=`echo "${__cc_output_directory}" | sed -e "s|%line%|${__cc_line}|g"`

__cc_new_output_directory=`_sanitize_output_directory "${__cc_new_output_directory}"`
Expand Down
21 changes: 12 additions & 9 deletions lib/parse_artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ _parse_artifact()

# replace %user% and %user_home% in path
__pa_new_path=`echo "${__pa_path}" \
| sed -e "s|%user%|${__pa_user}|g" \
-e "s|/%user_home%|${__pa_home}|g" \
-e "s|%user_home%|${__pa_no_slash_home}|g" 2>/dev/null`
| sed -e "s|%user%|\"${__pa_user}\"|g" \
-e "s|/%user_home%|\"${__pa_home}\"|g" \
-e "s|%user_home%|\"${__pa_no_slash_home}\"|g" \
-e "s|\"\"|\"|g" 2>/dev/null`

if [ "${__pa_collector}" = "file" ]; then
if echo "${__pa_processed_home}" | grep -q -E "\|${__pa_new_path}\|"; then
Expand All @@ -301,15 +302,17 @@ _parse_artifact()

# replace %user% and %user_home% in command
__pa_new_command=`echo "${__pa_command}" \
| sed -e "s|%user%|${__pa_user}|g" \
-e "s|/%user_home%|${__pa_home}|g" \
-e "s|%user_home%|${__pa_no_slash_home}|g" 2>/dev/null`
| sed -e "s|%user%|\"${__pa_user}\"|g" \
-e "s|/%user_home%|\"${__pa_home}\"|g" \
-e "s|%user_home%|\"${__pa_no_slash_home}\"|g" \
-e "s|\"\"|\"|g" 2>/dev/null`

# replace %user% and %user_home% in foreach
__pa_new_foreach=`echo "${__pa_foreach}" \
| sed -e "s|%user%|${__pa_user}|g" \
-e "s|/%user_home%|${__pa_home}|g" \
-e "s|%user_home%|${__pa_no_slash_home}|g" 2>/dev/null`
| sed -e "s|%user%|\"${__pa_user}\"|g" \
-e "s|/%user_home%|\"${__pa_home}\"|g" \
-e "s|%user_home%|\"${__pa_no_slash_home}\"|g" \
-e "s|\"\"|\"|g" 2>/dev/null`

# replace %user% and %user_home% in output_directory
__pa_new_output_directory=`echo "${__pa_output_directory}" \
Expand Down
Loading