From 023de15f0ea86a83b5aa463f6cb18e3f4e36870a Mon Sep 17 00:00:00 2001 From: zu1k Date: Thu, 20 Aug 2020 20:32:03 +0800 Subject: [PATCH] config file not found --- Dockerfile | 1 - main.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 754d6b7..540a360 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,5 @@ FROM alpine:latest RUN apk add --no-cache ca-certificates WORKDIR /proxypool-src COPY ./assets /proxypool-src/assets -COPY ./source.yaml /proxypool-src COPY --from=builder /proxypool /proxypool-src/ ENTRYPOINT ["/proxypool-src/proxypool"] diff --git a/main.go b/main.go index 1e5be1e..4a41fed 100644 --- a/main.go +++ b/main.go @@ -59,7 +59,8 @@ func initConfigFile(path string) { } else { err := app.InitConfigAndGetters(configFilePath) if err != nil { - panic(err) + fmt.Errorf("Config file not found") + os.Exit(2) } } }