xavdid / heroku-config

[Utility] Push and pull heroku environment variables to your local env

Home Page:https://www.npmjs.com/package/heroku-config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On Windows PowerShell, got error `ERR_INVALID_ARG_TYPE: The "path" argument must be of type string...`

ot32em opened this issue · comments

It seems heroku config:pull requires the environment variable HOME has to be defined,
or the path.join(process.env.HOME, ...) will get a argument is non-string type error.

https://github.com/xavdid/heroku-config/blob/master/util/file.js#L146

First time run it on Windows PowerShell got some confused.
So I set $env:HOME="" as a workaround.
Then the config output can be generated as expected.

Ah, thank you for finding this!

Just to verify - does the following node snippet produce your home directory in a fresh shell?

console.log(require('os').homedir());

Yes, it shows my user directory on Windows, => C:\Users\my_windows_username.

sweet! Fixed with 1.5.3, just released.