Permalink
Browse files

Suppress version warnings by default

  • Loading branch information...
patthiel committed Dec 3, 2018
1 parent dfd1de0 commit 01639509610b82c2a77c86125b1f5321bf251b0f
Showing with 4 additions and 2 deletions.
  1. +4 −2 Dockerfile-bats
@@ -17,11 +17,13 @@ WORKDIR /src/linode-cli
COPY . .
# Preserve the original cli.py file
RUN mv linodecli/cli.py linodecli/original-cli.py
# Preserve the original cli.py file with a same name file ending in .backup
# Modify the cli.py to suppress version warnings by default
# Modify the cli.py to no longer verify certs and suppress warnings (allows running tests on custom environments)
RUN sed 's/data=body/data=body,verify=False/' linodecli/original-cli.py > linodecli/cli.py \
RUN sed -i .backup 's/data=body/data=body,verify=False/' linodecli/cli.py \
&& sed -i= 's/suppress_warnings = False/suppress_warnings = True/' linodecli/cli.py \
&& echo "from requests.packages.urllib3.exceptions import InsecureRequestWarning\nrequests.packages.urllib3.disable_warnings(InsecureRequestWarning)" >> /src/linode-cli/linodecli/cli.py
# Build and Install the Linode CLI

0 comments on commit 0163950

Please sign in to comment.