Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed home environment variable to be set #161

Merged
merged 1 commit into from
Aug 18, 2015
Merged

Allowed home environment variable to be set #161

merged 1 commit into from
Aug 18, 2015

Conversation

mootpt
Copy link
Contributor

@mootpt mootpt commented Aug 17, 2015

This was fixed in the package provider, but never fixed in the exec the nodejs::npm class was utilizing for installations:

Heres a bit of background:

Node-gyp expects either HOME or USERPROFILE to be defined in the environment. If it is not set, installation will fail.

Error: node-gyp requires that the user's home directory is specified in either of the environmental variables HOME or USERPROFILE

@mootpt
Copy link
Contributor Author

mootpt commented Aug 17, 2015

This is related to: #35

@mootpt
Copy link
Contributor Author

mootpt commented Aug 17, 2015

thanks @hunner

@mootpt mootpt closed this Aug 17, 2015
@mootpt mootpt reopened this Aug 17, 2015
it 'the environment variable HOME should be /root' do
is_expected.to contain_exec('npm_install_express').with({
'environment' => 'HOME=/root',
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It this whitespace off?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appears to be normal

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space before the } causing it not to line up.

This was fixed in the package provider, but never fixed in the exec the nodejs::npm class was utilizing for installations:

Heres a bit of background:

Node-gyp expects either HOME or USERPROFILE to be defined in the environment. If it is not set, installation will fail.

```
Error: node-gyp requires that the user's home directory is specified in either of the environmental variables HOME or USERPROFILE
```

Update nodejs_npm_spec.rb

Added spec test where the environment variable HOME is defined as '/root'

Update nodejs_npm_spec.rb

fixed spec test

fixed whitespacing issues
nibalizer added a commit that referenced this pull request Aug 18, 2015
Allowed home environment variable to be set
@nibalizer nibalizer merged commit 2581cdd into voxpupuli:master Aug 18, 2015
cegeka-jenkins pushed a commit to cegeka/puppet-nodejs that referenced this pull request Oct 23, 2017
Allowed home environment variable to be set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants