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

fix: use $() to precompute clang version #1554

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jun 13, 2017

Fix clang_version does not expand as expected. This fix is sub-product of previous curl compression patch (#1550).

One can verify the correctness of the patch from the following snippet

#!/bin/bash

fxy() {
    echo "${1#v}" and "${2#v}"
}

g() {
    echo "h"
}

echo $(fxy g h)
echo $(fxy "$(g)" h)

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Great catch!

I don't think this is tested, so this fix is good as-is.

@ljharb ljharb added bugs Oh no, something's broken :-( installing node Issues with installing node/io.js versions. labels Jun 13, 2017
@JLHwung
Copy link
Contributor Author

JLHwung commented Jun 13, 2017

You are welcome. I really stuck for a while on curl_use_compression before I figure out that nvm_curl_version is not expanded at all 😅. so I knew there is similar situations on clang_version.

@ljharb ljharb merged commit 28fe93c into nvm-sh:master Jun 13, 2017
@JLHwung JLHwung deleted the fix_clang_version_usage branch June 13, 2017 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Oh no, something's broken :-( installing node Issues with installing node/io.js versions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants