build: avoid usage of pipes library

Python's `pipes` library is deprecated and will be removed in Python
version 3.13, so remove it's import and replace `pipes.quote()` with
`shlex.quote()`.

PR-URL: https://github.com/nodejs/node/pull/47271
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
pull/47302/head
Mohammed Keyvanzadeh 2023-03-29 23:04:58 +03:30 committed by GitHub
parent 2adb8b1054
commit ae4f041cdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -5,7 +5,6 @@ import sys
import errno
import argparse
import os
import pipes
import pprint
import re
import shlex
@ -2074,7 +2073,7 @@ write('config.gypi', do_not_edit +
pprint.pformat(output, indent=2, width=1024) + '\n')
write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' +
' '.join([pipes.quote(arg) for arg in original_argv]) + '\n')
' '.join([shlex.quote(arg) for arg in original_argv]) + '\n')
os.chmod('config.status', 0o775)