Skip to content

Error when loading ".. include ::" #2

@btyokotast

Description

@btyokotast

I am using textlint-plugin-rst via textlint.
When executing the textlint command, the following error occurred.

$ textlint pass/index.rst
<stdin>:1: (SEVERE/4) Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: 'C:/may-declaration.rst'.
Exiting due to level-4 (SEVERE) system message.
× Error
Command failed: rst2ast -q
<stdin>:1: (SEVERE/4) Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: 'C:/my-declaration.rst'.
Exiting due to level-4 (SEVERE) system message.


× Stack trace
Error: Command failed: rst2ast -q
<stdin>:1: (SEVERE/4) Problems with "include" directive path:
InputError: [Errno 2] No such file or directory: 'C:/my-declaration.rst'.
Exiting due to level-4 (SEVERE) system message.

    at checkExecSyncError (child_process.js:464:13)
    at execSync (child_process.js:504:13)
    at parse (C:\mydir\npm\node_modules\textlint-plugin-rst\lib\rst-to-ast.js:38:54)
    at preProcess (C:\mydir\npm\node_modules\textlint-plugin-rst\lib\ReSTProcessor.js:25:48)
    at TextlintCore._parallelProcess (C:\mydir\npm\node_modules\textlint\lib\textlint-core.js:237:23)
    /* omitted */

The target file is as follows.
pass/index.rst

.. include:: /my-declaration.rst

contents
// omitted

It probably occurred because ".. include :: /my- declaration.rst" of "index.rst" was interpreted as an absolute path.

Is there a workaround?

The usage environment is as follows.


OS:windows7
textlint:v7.3.0
node:v4.4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions