File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,14 @@ func main() {
62
62
log .SetLevel (log .DebugLevel )
63
63
log .SetReportCaller (true )
64
64
65
+ // download code archive if env variable is set
66
+ if err := DownloadCodeArchives (lsOpts .CodeArchives ); err != nil {
67
+ log .Fatal ("Failed to download code archives" )
68
+ }
69
+ // enable dns server
70
+ dnsServerContext , stopDnsServer := context .WithCancel (context .Background ())
71
+ go RunDNSRewriter (lsOpts , dnsServerContext )
72
+
65
73
// Switch to non-root user and drop root privileges
66
74
if IsRootUser () && lsOpts .User != "" {
67
75
uid := 993
@@ -75,13 +83,6 @@ func main() {
75
83
UserLogger ().Debugln ("Process running as non-root user." )
76
84
}
77
85
78
- // download code archive if env variable is set
79
- if err := DownloadCodeArchives (lsOpts .CodeArchives ); err != nil {
80
- log .Fatal ("Failed to download code archives" )
81
- }
82
- // enable dns server
83
- dnsServerContext , stopDnsServer := context .WithCancel (context .Background ())
84
- go RunDNSRewriter (lsOpts , dnsServerContext )
85
86
// parse CLI args
86
87
opts , args := getCLIArgs ()
87
88
bootstrap , handler := getBootstrap (args , opts )
You can’t perform that action at this time.
0 commit comments