title: Gitlab CI Cleaning up file based variables Error: exit status 1
body: <p>I am using fastlane with Gitlab CI to build iOS projects. GItlab-runner runs as shell. Here is the yml file.</p>
  <pre><code>before_script:
    - export LC_ALL=en_US.UTF-8
    - export LANG=en_US.UTF-8
    - export BUILD_TIME=$(date '+%Y-%m-%d %H:%M:%S')
    - echo $branch
    
  stages:
    - build
    
  build_job:
    stage: build
    tags:
      - ClaimIt2020
      - iOS
    only:
      variables:
        - $branch
    script:
      - bundle install
      - fastlane $scheme
    artifacts:
      expire_in: 30 days
      paths:
        - build
  </code></pre>
  <p>But my pipelines fails with the given error in logs</p>
  <pre><code>Running with gitlab-runner 13.8.0 (775dd39d)
    on ClaimIt CI runner wHJuZbdb
  Preparing the &quot;shell&quot; executor
  00:00
  Using Shell executor...
  Preparing environment
  00:01
  Running on macmini-57.macweb.com...
  Getting source from Git repository
  00:00
  Fetching changes...
  Reinitialized existing Git repository in /Users/cloud/Desktop/ClaimIt/ClaimIt-iOS-new/builds/wHJuZbdb/0/Protovate/ClaimIt-iOS-new/.git/
  Cleaning up file based variables
  00:00
  ERROR: Job failed: exit status 1
  </code></pre>
  <p>Please advise.</p>