Skip to content

Commit 13569c8

Browse files
committed
Fix bin folder for nodejs
Signed-off-by: Uilian Ries <uilianries@gmail.com>
1 parent 664f839 commit 13569c8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

recipes/nodejs/all/conanfile.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,13 @@ class NodejsInstallerConan(ConanFile):
1010
url = "https://github.com/conan-io/conan-center-index"
1111
homepage = "https://nodejs.org"
1212
license = "MIT"
13-
settings = "os_build", "arch_build"
13+
settings = {"os_build": ["Windows", "Linux", "Macos"], "arch_build": ["x86_64"]}
1414
no_copy_source = True
1515

1616
@property
1717
def _source_subfolder(self):
1818
return os.path.join(self.source_folder, "source_subfolder")
1919

20-
def configure(self):
21-
if self.settings.arch_build == "x86" and self.settings.os_build == "Linux":
22-
raise ConanInvalidConfiguration("Linux x86 is not support by nodejs")
23-
if self.settings.os_build not in ["Windows", "Macos", "Windows"]:
24-
raise ConanInvalidConfiguration("The OS '%s' is not support by nodejs" % str(self.settings.os_build))
25-
2620
def source(self):
2721
for data in self.conan_data["sources"][self.version]:
2822
oss, sha, url = data.values()
@@ -40,6 +34,6 @@ def package(self):
4034
self.copy(pattern="npx", src=self._source_subfolder, dst="bin")
4135

4236
def package_info(self):
43-
bin_dir = self.package_folder if tools.os_info.is_windows else os.path.join(self.package_folder, "bin")
37+
bin_dir = os.path.join(self.package_folder, "bin")
4438
self.output.info('Appending PATH environment variable: {}'.format(bin_dir))
4539
self.env_info.PATH.append(bin_dir)

0 commit comments

Comments
 (0)