Skip to content

Fail fast on the command line when no device is connected #1791

Description

@danielmeza

Description

In a non-interactive or CI context, a deploy/monitor command with no device attached should fail fast with a clear error rather than blocking on an interactive prompt or a connect timeout. The CLI experience spec calls for this fast-fail behavior. It is not implemented, so a CI job that reaches a deploy step without a device can hang instead of failing cleanly.

How to solve the problem

In non-interactive/CI contexts, have deploy, monitor, and watch detect the "no device" condition and exit promptly with a non-zero code and an actionable message, instead of prompting or waiting on a timeout. Interactive sessions keep their current prompt behavior.

Acceptance: dotnet nano deploy (and the monitor/watch verbs) run in CI with no device attached fail fast with a clear, actionable error and a non-zero exit code; interactive runs are unchanged.

Describe alternatives you've considered

  • Rely on an overall CI step timeout. That turns a clear, immediate error into a slow, opaque failure.
  • Always prompt. A prompt in CI hangs the job, which is the problem being fixed.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions