From e31c24d3bb4db9dde2be2309e11cf5d5ee07d8b4 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 28 Jun 2020 21:50:26 +0100 Subject: [PATCH] Fix overridden PATH test, by ensuring bash command substitution rules --- cibuildwheel/bashlex_eval.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cibuildwheel/bashlex_eval.py b/cibuildwheel/bashlex_eval.py index f4f0641d..b5e478c8 100644 --- a/cibuildwheel/bashlex_eval.py +++ b/cibuildwheel/bashlex_eval.py @@ -41,7 +41,9 @@ def evaluate_node(node: bashlex.ast.node, context: NodeExecutionContext) -> str: if node.kind == 'word': return evaluate_word_node(node, context=context) elif node.kind == 'commandsubstitution': - return evaluate_command_node(node.command, context=context) + node_result = evaluate_command_node(node.command, context=context) + # bash removes training newlines in command substitution + return node_result.rstrip() elif node.kind == 'parameter': return evaluate_parameter_node(node, context=context) else: