keybase / node-installer

An installer/updater for the node client.
BSD 3-Clause "New" or "Revised" License
117 stars 9 forks source link

keybase-installer 1.0.2 fails on Win8.1 in GitHub for Windows Powershell with Error: TEMP didn't end in \Temp #71

Open petrsnd opened 9 years ago

petrsnd commented 9 years ago

Used npm to get the installer, but it failed to install:

PS ~> npm install -g keybase-installer
C:\Users\Dan\AppData\Roaming\npm\keybase-installer -> C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\bin\main.js
keybase-installer@1.0.2 C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer
PS ~> keybase-installer
info: Made temporary directory: C:\Users\Dan\AppData\Local\Temp\keybase_install_aXXpeCqT5YF6XWzLb1E6Hw
C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\node_modules\keybase-path\lib\main.js:232
          throw err;
                ^
Error: TEMP didn't end in \Temp
    at Win32.home (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\node_modules\keybase-path\lib\main.js:230:203)
    at home (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\lib\config.js:65:15)
    at Config.exports.Config.Config.get_keyring_dir (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\lib\config.js:86:16)
    at Config.exports.Config.Config.init_keyring (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\lib\config.js:113:18)
    at iced.Deferrals.parent (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\lib\installer.js:326:36)
    at C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\lib\installer.js:330:23
    at Deferrals.exports.Deferrals.Deferrals._call (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\node_modules\iced-runtime\lib\runtime.js:86:16)
    at C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\node_modules\iced-runtime\lib\runtime.js:98:26
    at exports.trampoline.trampoline (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\node_modules\iced-runtime\lib\runtime.js:64:14)
    at Deferrals.exports.Deferrals.Deferrals._fulfill (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase-installer\node_modules\iced-runtime\lib\runtime.js:96:16)
PS ~> npm list -g keybase-installer
C:\Users\Dan\AppData\Roaming\npm
└── keybase-installer@1.0.2

I tried under cmd.exe, and it first told me that I had forgotten to install GnuPG, but then it worked great. Not sure this is going to be an important issue for you, but lots of people on Windows run Powershell as their default shell. I'm not a huge node guy, but I haven't had problems running other node programs under Powershell.

petrsnd commented 9 years ago

I'm seeing the same thing using keybase after the successful install:

PS ~> keybase version
C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\node_modules\keybase-path\lib\main.js:232
          throw err;
                ^
Error: TEMP didn't end in \Temp
    at Win32.home (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\node_modules\keybase-path\lib\main.js:230:203)
    at Win32.config_dir_v1 (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\node_modules\keybase-path\lib\main.js:209:19)
    at Env.get_config_dir (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\env.js:151:28)
    at get_opt.dflt (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\env.js:236:31)
    at Env.get_opt (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\env.js:143:231)
    at Env.get_config_filename (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\env.js:227:19)
    at C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\env.js:174:32
    at Env.maybe_fallback_to_layout_v1 (C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\env.js:198:15)
    at C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:158:21
    at C:\Users\Dan\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:167:15

Let me know how I can help.

petrsnd commented 9 years ago

The keybase binary also works as long as I load it without my profile.

From cmd.exe:

C:\Windows\System32>powershell -noprofile
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

PS C:\Windows\System32> keybase version
warn: No config file found; tried 'C:\Users\Dan\AppData\Roaming\keybase\config.json'
keybase (keybase.io CLI) v0.8.12
- node.js v0.12.7
- gpg (GnuPG) 2.0.28 (Gpg4win 2.2.5)
- libgcrypt 1.6.3
Identifies as: 'keybase.io node.js client v0.8.12 win32'
PS C:\Windows\System32>

Looks like it just me! My profile can be found here: https://gist.github.com/petrsnd/77eebce987473c0debc1

The only other thing is that I run Powershell inside ConEmu. But, I ran Powershell outside of ConEmu in the standard Windows console and it still fails with the same error.

petrsnd commented 9 years ago

After reviewing my profile, it doesn't seem like there is anything suspect in there. However, I do source in the GitHub for Windows powershell profile that sets things up to work well with GitHub.

. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")

You might look into how well this works with GitHub for Windows when you have Powershell set as your default shell.

petrsnd commented 9 years ago

I confirmed that it is the GitHub for Windows Powershell profile causing the problem by replacing my custom profile with the GitHub for Windows file referenced in the last comment.