edgedb-cli icon indicating copy to clipboard operation
edgedb-cli copied to clipboard

Error when linking a new instance and using `-I`

Open aljazerzen opened this issue 1 year ago • 2 comments

  • EdgeDB CLI Version: EdgeDB CLI 3.0.0-dev
  • OS Version: Ubuntu 22.02

Steps to Reproduce:

  1. edgedb instance link -I asxasxasx
  2. Type anything when prompted for more info (I just pressed enter 3x)
edgedb error: ClientError: cannot read credentials file /home/aljaz/.config/edgedb/credentials/asxasxasx.json: No such file or directory (os error 2)

Full output:

➜  movies edgedb instance link -I asxasxasx
Specify the host of the server [default: localhost]:
> localhost
Specify the port of the server [default: 5656]:
> 5656
Specify the database user [default: edgedb]:
> edgedb
Specify the database name [default: edgedb]:
> edgedb
edgedb error: ClientError: cannot read credentials file /home/aljaz/.config/edgedb/credentials/asxasxasx.json: No such file or directory (os error 2)

aljazerzen avatar Apr 05 '23 20:04 aljazerzen

It looks like asxasxasx is a non existing instance, right? Logic of link command suggests that link -I is probably for copying credentials?

So I'd expect:

  1. Not asking all those fields (we don't ask things defined on command-line)
  2. Fail early (although, it's not invisible if no question asked)

In other words:

  1. Check if source exists (probably validate that it's valid credentials file)
  2. Ask name to copy to
  3. Copy the file

Is this what you expect?

(also please add git hash when reporting version built from repository, it's git describe or git rev-parse --short HEAD).

tailhook avatar Apr 06 '23 14:04 tailhook

  1. Check if source exists (probably validate that it's valid credentials file)
  2. Ask name to copy to
  3. Copy the file

Exactly.

(also please add git hash when reporting version built from repository, it's git describe or git rev-parse --short HEAD).

:+1:

aljazerzen avatar Apr 06 '23 17:04 aljazerzen