无法在TFX-CLI控制台(NPM)上粘贴文本

时间:2017-11-11 02:51:38

标签: node.js npm command-line-interface

运行tfx-cli时,我无法在CLI提示处粘贴文本。

我刚刚安装了Node v8.9.1 LTS。不幸的是,tfx-cli安装第一次挂起。我按Ctrl+C取消它,再次运行它,第二次完成。 (在第二次运行期间在屏幕上闪现的文字中,我相信我看到了'失败'和'回滚'的内容。)

我不知道最初的失败是否会导致我的问题。

当我运行tfx login时,我首先收到此提示:

> Service URL:

我可以输入此提示,但我无法粘贴。输入网址后按Enter即可:

> Personal access token:

我既不能粘贴也不能在此提示下键入(或者至少在键入时光标不会前进)。这里似乎唯一有用的键是EnterCtrl+C。按Enter而不输入任何内容会导致:

error: Invalid input for Personal access token:

在输入几个随机字符后按Enter不会向控制台发送任何输出,只需将我转发回C:\>提示符。

如何解决这个问题?如何确定是节点问题还是tfx-cli问题?我怀疑后者,但我不确定。

- 编辑 -

其他人是否能够在这些提示下粘贴文字?

1 个答案:

答案 0 :(得分:0)

I tested on my side with Node v8.9.1 LTS installed. Everything works correctly.

Make sure you have activated the command line window before pasting the text.

For Personal access token or password, it's implicit (non-visible) in the command line. The token strings will not show there when pasting the PAT/password. But it works if you enter the correct token.

So, just make sure you activated the cmd window before paste action:

  1. Copy PAT/password (Sometimes you need to try this several times to make sure the strings are copied)
  2. Activate the command line window (click within the window to active it)
  3. Paste the PAT/password (It's implicit, just make sure you pasted the correct token )
  4. Enter

UPDATE:

Seems related to the OS or permission. Whatever, you can try running the cmd as Administrator, then check whether you can copy and paste now.

Besides, you can also try to enable "QuickEdit Mode" for CMD console. ( Right-click on the title-bar of your cmd window. --> [Properties] - Options - check "QuickEdit Mode"

Also try the ways mentioned in this article: How to Enable CTRL+C / Ctrl+V for Pasting in the Windows Command Prompt

enter image description here