From f4a57d0bcc69c187e15d9f88e1f515aa09ff123c Mon Sep 17 00:00:00 2001 From: Duncan Bellamy Date: Sat, 29 Aug 2020 10:07:46 +0100 Subject: [PATCH] remove main node.js mirror in tests if musl last fix for #267 fixes #267 --- tests/nodeenv_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/nodeenv_test.py b/tests/nodeenv_test.py index ef59891..ecf182c 100644 --- a/tests/nodeenv_test.py +++ b/tests/nodeenv_test.py @@ -5,6 +5,7 @@ import pipes import subprocess import sys +import sysconfig import mock import pytest @@ -117,6 +118,11 @@ def test_mirror_option(): 'https://npm.some-mirror.com/download/release/index.json'), ('', 'https://nodejs.org/download/release/index.json')] + sys_type = sysconfig.get_config_var('HOST_GNU_TYPE') + musl_type = ['x86_64-pc-linux-musl', 'x86_64-unknown-linux-musl'] + # Check if running on musl system and delete last mirror if it is + if sys_type in musl_type: + urls.pop() with open(os.path.join(HERE, 'nodejs_index.json'), 'rb') as f: def rewind(_): f.seek(0)