Made Init safer
Init fails if go.mod exists. Removed commands that prevented this. If go init is to be re-run, then the go.mod needs to be manually removed, as it should be.
This commit is contained in:
@@ -40,7 +40,7 @@ FROM base as mod-init-base
|
||||
WORKDIR /out
|
||||
COPY . .
|
||||
ENV MODNAME example
|
||||
RUN rm -f go.sum go.mod ; go mod init "${MODNAME}" && go mod tidy
|
||||
RUN go mod init "${MODNAME}" && go mod tidy
|
||||
|
||||
FROM base AS mod-tidy
|
||||
WORKDIR /out
|
||||
|
||||
Reference in New Issue
Block a user