bloq / cloud-cli

☁️💻
MIT License
0 stars 0 forks source link

Fixes coppyToClipboard and replaces request on client-token.js #194

Closed raiseerco closed 2 years ago

raiseerco commented 2 years ago

This PR will fix the promise rejection error when some command tries to copy a credential into clipboard. Additionally tried (and failed) to fix the copy bug on a headless environment. Since we are using clipboardy package to get access to the clipboard, it depends on execa package to execute the xsel command, and it need to access to X server that (obviously for a headless Linux os) is not present.

Possibles workarounds here: https://askubuntu.com/questions/1111646/alternative-to-xsel-or-xclip-without-x11-installed https://askubuntu.com/questions/305654/xclip-on-headless-server

In parallel, this PR will replace the usage of request by node-fetch on client-token.js. Remaining files will be updated on a next PR.

Screenshots

On a first run, xsel command needs to be installed:

image

After installing xsel we get further info:

image

And same result for bcl client-token:

image

Process checklist

Related issue(s)

Closes #164

Metrics

Actual effort: 1d