# Understanding Dart example in docs

**URL:** <https://discuss.circleci.com/t/understanding-dart-example-in-docs/41124>\
**Category:** Documentation\
**Created:** [September 3, 2021, 7:32am UTC](https://discuss.circleci.com/t/understanding-dart-example-in-docs/41124 "2021-09-03T07:32:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![happy-san](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/happy-san/32/28090_2.png) [@happy-san](https://discuss.circleci.com/u/happy-san)\
**Post date:** [September 3, 2021, 7:32am UTC](https://discuss.circleci.com/t/understanding-dart-example-in-docs/41124/1 "2021-09-03T07:32:02Z")

</div>

Hey community,  
I’ve tried looking what exactly `/bin/bash --login -eo pipefail` this code from the example does but couldn’t find anything. Could you direct me to an article or explain what it does?

Thanks.

```yaml
commands:
  dependencies:
    description: "Download dependencies and setup global packages"
    parameters:
      shell:
        type: string
        default: "/bin/bash --login -eo pipefail"
      pub-cache:
        type: string
        default: "~/.pub-cache"
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1.4-dependencies-{{ arch }}-{{ checksum "pubspec.lock" }}
            - v1.4-dependencies-{{ arch }}-
      - run:
          name: Download deps
          shell: << parameters.shell >>
          command: pub get
      - run:
          name: Get junitreporter
          shell: << parameters.shell >>
          command: pub global activate junitreport
      - save_cache:
          key: v1.4-dependencies-{{ arch }}-{{ checksum "pubspec.lock" }}
          paths:
            - .dart_tool
            - << parameters.pub-cache >>

  native-build:
    description: "Runs the dart2native command to build native executable for machine. Artifacts executable"
    parameters:
      shell:
        type: string
        default: "/bin/bash --login -eo pipefail"
    steps:
      - run:
          name: Native compile
          shell: << parameters.shell >>
          command: dart2native bin/server.dart -o circleci_dart_demo.exe
      - store_artifacts:
          path: circleci_dart_demo.exe

```

---

<div class="post-metadata">

**Author:** ![happy-san](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/happy-san/32/28090_2.png) [@happy-san](https://discuss.circleci.com/u/happy-san)\
**Post date:** [September 3, 2021, 7:46am UTC](https://discuss.circleci.com/t/understanding-dart-example-in-docs/41124/2 "2021-09-03T07:46:58Z")

</div>

So I found [this gist](https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425) which explained what `set -euxo pipefail` does. I believe `-eo pipefail` is derived from this command.

What about `--login` part?

---

<div class="post-metadata">

**Author:** ![marc](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/marc/32/835_2.png) [@marc](https://discuss.circleci.com/u/marc)\
**Post date:** [September 3, 2021, 9:22am UTC](https://discuss.circleci.com/t/understanding-dart-example-in-docs/41124/3 "2021-09-03T09:22:28Z")

</div>

Hi happy-san,

The shell options that we use, and their meaning are [documented in the config reference](https://circleci.com/docs/2.0/configuration-reference/#default-shell-options). If this doesn’t cover what you need, feel free to open an Issue on the repo.

The `--login` option specifies that a login shell is used for commands. You can [read more about it on the bash man page](https://linux.die.net/man/1/bash).

Marc

---

<div class="post-metadata">

**Author:** ![happy-san](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/happy-san/32/28090_2.png) [@happy-san](https://discuss.circleci.com/u/happy-san)\
**Post date:** [September 3, 2021, 1:40pm UTC](https://discuss.circleci.com/t/understanding-dart-example-in-docs/41124/4 "2021-09-03T13:40:58Z")

</div>

Hey Marc! Thanks for sharing the links.
