Skip to content

Commit

Permalink
Fix nginxCloneScriptTemplate for old shells
Browse files Browse the repository at this point in the history
dash version 0.5.10.2-5 return error for export command with spaces after = symbol:
```
# export qwe=nginx version: nginx/1.20.1
dash: 10: export: version:: bad variable name
```
  • Loading branch information
IldarMinaev authored Jan 22, 2025
1 parent 1980f08 commit a803ee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/instrumentation/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func injectNginxSDK(_ logr.Logger, nginxSpec v1alpha1.Nginx, pod corev1.Pod, use
nginxCloneScriptTemplate :=
`
cp -r %[2]s/* %[3]s &&
export %[4]s=$( { nginx -v ; } 2>&1 ) && echo ${%[4]s##*/} > %[3]s/version.txt
export %[4]s="$( { nginx -v ; } 2>&1 )" && echo ${%[4]s##*/} > %[3]s/version.txt
`
nginxAgentCommands := prepareCommandFromTemplate(nginxCloneScriptTemplate,
nginxConfFile,
Expand Down

0 comments on commit a803ee4

Please sign in to comment.