Skip to content

DVC exits with code 0 even if there was an error #2850

@peper0

Description

@peper0

Tested with dvc 0.70 from apt on Ubuntu:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

Can be easily reproduced with docker. The following example shows pulling from a nonexistent repository but the same problem is with errors of any kind.

Steps to reproduce
Create a following Dockerfile:

FROM ubuntu:18.04

RUN apt update
RUN apt install -y wget
RUN wget https://dvc.org/deb/dvc.list -O /etc/apt/sources.list.d/dvc.list
RUN apt update 
RUN apt install -y dvc
WORKDIR /work
RUN dvc init --no-scm
CMD bash -c 'dvc pull -r bleble && echo "command succesfull, but should not be"'

Build it:
$ docker build . -t dvc-bug

Run it:
$ docker run -it dvc-bug

Obtained result

ERROR: failed to pull data from the cloud - config file error: unable to find remote section 'bleble'

Having any troubles?. Hit us up at https://dvc.org/support, we are always happy to help!
command succesfull, but should not be

Expected result
No command succesfull, but should not be text in the output.

Mentioned earlier in #2038

Metadata

Metadata

Assignees

Labels

bugDid we break something?

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions