krane / krane/cli

Better error when invalid URL passed into `krane login`

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Description

When running the below command the CLI will error with Error: Unable to authenticate with example.com

$ krane login example.com

This happens because the URL does not contain http or https. We should instead either default to https or throw an error when an invalid URL is passed in.

Fix

Add http or https

$ krane login https://example.com

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the krane login command and reproduce the documented krane login example.com behavior, then trace how its URL is handled before authentication. Done means the command has defined behavior for a bare host and correctly handles the documented krane login https://example.com form.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.