Open
Description
Details
- Read the Docs project URL: https://readthedocs.org/projects/nvitop/
- Build URL (if applicable): https://readthedocs.org/projects/nvitop/builds/17338573/
- Read the Docs username (if applicable): https://readthedocs.org/profiles/XuehaiPan/
Expected Result
A description of what you wanted to happen
Run build.jobs
command successfully
My .readthedocs.yaml
:
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"
jobs:
post_install:
- sed -i -E 's/^ process identity for every yielded instance$/ \0/' "$(python3 -c "print(__import__('psutil').__file__)")"
# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/source/conf.py
fail_on_warning: true
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
system_packages: true
I want to run command:
sed -i -E 's/^ process identity for every yielded instance$/ \0/' "$(python3 -c "print(__import__('psutil').__file__)")"
after installing the dependencies.
Actual Result
A description of what actually happened
Got errors in raw output:
[rtd-command-info] start-time: 2022-07-02T10:39:42.282806Z, end-time: 2022-07-02T10:39:42.362971Z, duration: 0, exit-code: 1
sed -i -E 's/^ process identity for every yielded instance$/ \0/' "$(python3 -c "print(__import__('psutil').__file__)")"
sed: -e expression #1, char 3: unterminated `s' command
In:
readthedocs.org/readthedocs/doc_builder/director.py
Lines 339 to 341 in 62effc7
we split the command with whitespace into a list of command-line options. In my use case, I have:
>>> command = r'''sed -i -E 's/^ process identity for every yielded instance$/ \0/' "$(python3 -c "print(__import__('psutil').__file__)")"'''
>>> print(command)
sed -i -E 's/^ process identity for every yielded instance$/ \0/' "$(python3 -c "print(__import__('psutil').__file__)")"
>>> command.split() # split with whitespace
[
'sed',
'-i',
'-E',
"'s/^",
'process',
'identity',
'for',
'every',
'yielded',
'instance$/',
"\\0/'",
'"$(python3',
'-c',
'"print(__import__(\'psutil\').__file__)")"'
]
Expected split:
[
'sed',
'-i',
'-E',
"'s/^ process identity for every yielded instance$/ \\0/'",
'"$(python3 -c "print(__import__(\'psutil\').__file__)")"'
]