hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

hh shorthand opens HTML help on windows

Open kanej opened this issue 11 months ago • 1 comments

If you use the hh shorthand cli tool on Windows, it opens the HTML help app:

image

Initially raised in this discussion: https://github.com/NomicFoundation/hardhat/discussions/4971

Reproduction steps

  1. Install the hh shorthand based on the setup instructions of the Hardhat guide: npm install --global hardhat-shorthand
  2. In a Hardhat project run hh compile or hh test
  3. The HTML Help app will be inexplicable opened

kanej avatar Mar 27 '24 19:03 kanej

Hi, this is not really a bug. The reason why you type hh some strange web come up, is that hh in windows is point to C:\Windows\hh.exe . C:\Windows\hh.exe is the executable file for the helper program (HTML Helper) in Windows. When you open a Help file (usually a file ending with a .chm extension) on Windows, hh.exe is used to open and display the Help content.

So it is conflict with hh of hardhat-shorthand.

How to solve this

  1. Install hardhat hh through npm install --global hardhat-shorthand, and find it with npm list -g --depth 0 .
  2. And change the name hh/hh.cmd to ht/ht.cmd(any name you like), or change the hh.exe of windows to other name.
  3. Use the name [ht/ht.cmd with step 2 ].

Hope this answer will help you.

jwbda avatar Mar 28 '24 02:03 jwbda