File tree 2 files changed +15
-3
lines changed 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,14 @@ func (s *Supplier) Run() error {
115
115
116
116
func (s * Supplier ) WriteProfileD () error {
117
117
if s .Config .Dist == "openresty" {
118
- err := s .Stager .WriteProfileD ("openresty" , fmt .Sprintf ("export LD_LIBRARY_PATH=$DEPS_DIR/%s/nginx/luajit/lib\n " , s .Stager .DepsIdx ()))
118
+ err := s .Stager .WriteProfileD (
119
+ "openresty" ,
120
+ fmt .Sprintf (
121
+ "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH%s$DEPS_DIR/%s/nginx/luajit/lib\n export LUA_PATH=$DEPS_DIR/%s/nginx/lualib/?.lua\n " ,
122
+ string (os .PathListSeparator ),
123
+ s .Stager .DepsIdx (),
124
+ s .Stager .DepsIdx (),
125
+ ))
119
126
if err != nil {
120
127
return err
121
128
}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package supply_test
2
2
3
3
import (
4
4
"bytes"
5
+ "fmt"
5
6
"io/ioutil"
6
7
"os"
7
8
"path/filepath"
@@ -185,8 +186,12 @@ var _ = Describe("Supply", func() {
185
186
})
186
187
187
188
It ("writes openresty script" , func () {
188
- mockStager .EXPECT ().DepsIdx ().Return ("0" ).Times (2 )
189
- mockStager .EXPECT ().WriteProfileD ("openresty" , "export LD_LIBRARY_PATH=$DEPS_DIR/0/nginx/luajit/lib\n " )
189
+ mockStager .EXPECT ().DepsIdx ().Return ("0" ).Times (3 )
190
+ mockStager .EXPECT ().WriteProfileD ("openresty" , fmt .Sprintf (
191
+ "%s%s" ,
192
+ "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DEPS_DIR/0/nginx/luajit/lib\n " ,
193
+ "export LUA_PATH=$DEPS_DIR/0/nginx/lualib/?.lua\n " ,
194
+ ))
190
195
mockStager .EXPECT ().WriteProfileD ("nginx" , "export DEP_DIR=$DEPS_DIR/0\n mkdir -p logs" )
191
196
192
197
supplier .Config .Dist = "openresty"
You can’t perform that action at this time.
0 commit comments