denoland / deployctl

Command line tool for Deno Deploy
https://deno.com/deploy
MIT License
331 stars 52 forks source link

`deployctl deploy` on CircleCI errors out #262

Open lambtron opened 7 months ago

lambtron commented 7 months ago

my circleci config.yml:

version: 2.1
jobs:
  build_and_deploy:
    docker:
      - image: denoland/deno:alpine
    steps:
      # Clone repo
      - checkout
      # Replace this with steps to deploy to users
      - run:
          name: install deployctl
          command: deno install -qArf https://deno.land/x/deploy/deployctl.ts 
      - run:
          name: deploy project
          command: deployctl deploy --token=$DENO_DEPLOY_TOKEN hello.ts
workflows:
  example:
    jobs:
      - build_and_deploy

and when i run it

#!/bin/sh -eo pipefail
deployctl deploy --token=$DENO_DEPLOY_TOKEN hello.ts
-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C[-1C

ad infinitum.

but i can confirm that deployctl is installed properly and the DENO_DEPLOY_TOKEN is set.

lambtron commented 7 months ago

Seems like the output is ascii escape key as deployctl is searching for a tty to display interactive prompt.

rbetts commented 7 months ago

Apparently CI platforms commonly set a CI envvar that other systems use to detect and disable TTY.

We should teach deployctl a non-interactive mode flag or perhaps auto-detect this env var and toggle non-interactive mode.