Twingate-Labs / tg-cli

Command Line Interface for Administering Twingate
Apache License 2.0
24 stars 4 forks source link

CLI does not detect installed Digital Ocean CLI (doctl) #4

Closed alexmensch closed 2 years ago

alexmensch commented 2 years ago

When attempting to do a deployment:

➜  ~ ./tg deploy do vm -a tenant --size s-1vcpu-512mb-10gb
[INFO]    Using Twingate account: 'tenant'
[ERROR]   'doctl' CLI not detected on path. Please check that it is installed.
[ERROR]   Exception: Error: 'doctl' CLI not detected on path. Please check that it is installed.
    at DigitalOceanDeployer.checkAvailable (file:///home/runner/work/tg-cli/tg-cli/tg.bundle.js:72682:19)
    at async DigitalOceanDeployer.checkAvailable (file:///home/runner/work/tg-cli/tg-cli/tg.bundle.js:77143:9)
    at async DigitalOceanDeployer.deploy (file:///home/runner/work/tg-cli/tg-cli/tg.bundle.js:77394:9)
    at async Command.fn (file:///home/runner/work/tg-cli/tg-cli/tg.bundle.js:77455:28)
    at async Command.execute (file:///home/runner/work/tg-cli/tg-cli/tg.bundle.js:2470:13)
    at async main2 (file:///home/runner/work/tg-cli/tg-cli/tg.bundle.js:78840:12)
    at async file:///home/runner/work/tg-cli/tg-cli/tg.bundle.js:78843:5

The Digital Ocean CLI is installed, see below:

➜  ~ which doctl
/opt/homebrew/bin/doctl
➜  ~

doctl was installed with brew install doctl

emrul commented 2 years ago

Hi @alexmensch - thanks for reporting. We recently refactored the CLI detection code since command is not universally supported and this broke DigitalOcean. This should be fixed in the latest build so please could you try again.

As an action item we will check other deployment options too.

alexmensch commented 2 years ago

This works now, thanks!

emrul commented 2 years ago

Thank you for reporting and confirming the fix