Failed to install dart in travis

Hi
I’m trying to build and test my dart project . The build failed during the dart installation
command and error message

Installing Dart

$ curl --connect-timeout 15 --retry 5 https://storage.googleapis.com/dart-archive/channels/stable/release/["2.1.0"]/sdk/dartsdk-linux-x64-release.zip > ${TRAVIS_HOME}/dartsdk.zip

curl: (3) [globbing] bad range in column 70

The command "curl --connect-timeout 15 --retry 5 https://storage.googleapis.com/dart-archive/channels/stable/release/["2.1.0"]/sdk/dartsdk-linux-x64-release.zip > ${TRAVIS_HOME}/dartsdk.zip" failed and exited with 3 during .

Your build has been stopped.

my .travis file :

matrix:
  include:
    - language: dart
      dart:
      - "2.1.0"
      before_script:
      - cd clint
      script:
      - pub run test

the repo : https://github.com/ArielMannes/MTGDeckBot/tree/travis-ci

thanks

You are passing an array ["2.1.0"] to the Dart version definition in matrix.include. https://github.com/ArielMannes/MTGDeckBot/blob/f1304f7cee2608e59a32485f10fddccfd4c58003/.travis.yml#L4-L5

This does not work.

Either:

  1. Pass a string:
    matrix:
      include:
        - dart: 2.1.0
    
  2. Define Dart version(s) at the top level:
    language: dart
    dart:
      - 2.1.0
      - stable
    matrix:
      include:
      ⋮
    

See
https://docs.travis-ci.com/user/languages/dart#choosing-dart-versions-to-test-against

1 Like

Thanks a lot