deno_install icon indicating copy to clipboard operation
deno_install copied to clipboard

Binary path is not hot-changed by the PowerShell installer; installer instructions fail as a result

Open StoneCypher opened this issue 1 year ago • 0 comments

Went to try to install Deno on a laptop to re-test denoland/deno#15117. It appears that the PowerShell install approach does not hot-lodge the path changes, at least in Windows 11.

The installer tells you to run deno --help. However, since the path was only set at the system level, it is unchanged in the current env, and so the attempt to do so fails, as the command line is unable to locate the binary.

Killing the terminal and restarting it will fix it, but many junior programmers won't think to do that.

PS C:\Users\john> deno
deno : The term 'deno' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ deno
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (deno:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\john> irm https://deno.land/install.ps1 | iex
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 28.2M  100 28.2M    0     0  28.8M      0 --:--:-- --:--:-- --:--:-- 93.3M
Deno was installed successfully to C:\Users\john\.deno\bin\deno.exe
Run 'deno --help' to get started
Stuck? Join our Discord https://discord.gg/deno

PS C:\Users\john> deno --help
deno : The term 'deno' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ deno --help
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (deno:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException

StoneCypher avatar Feb 07 '23 23:02 StoneCypher