Skip to content

fix: correct path references in batch_convert_html.sh#39

Open
handsomesix wants to merge 1 commit into
alibaba:mainfrom
handsomesix:fix/doc-command-error
Open

fix: correct path references in batch_convert_html.sh#39
handsomesix wants to merge 1 commit into
alibaba:mainfrom
handsomesix:fix/doc-command-error

Conversation

@handsomesix

@handsomesix handsomesix commented Jun 12, 2026

Copy link
Copy Markdown

Summary

Fix the make doc command execution failure. Adjust the directory switching and script reference logic in batch_convert_html.sh to ensure the documentation conversion script runs from the correct path.

Root Cause

batch_convert_html.sh has multiple path handling issues:

  1. Initial directory switching uses SCRIPT_DIR/../, which enters the tools/ directory instead of the project root.
  2. Converter script references use ./converters/, but that path doesn't exist in the current working directory.
  3. Input directory existence check is performed after entering the scripts/ directory, causing path judgment based on the wrong working directory.

These issues collectively prevent make doc from correctly locating the conversion scripts and documentation directories.

Changes

  • Adjusted initial directory switching from SCRIPT_DIR/../ to SCRIPT_DIR/../../ to ensure entering the project root.
  • Changed converter script reference path from ./converters/ to ../tools/converters/.
  • Moved directory existence check to before entering the scripts/ directory to avoid path judgment issues caused by working directory changes.

Tests

  • Execute make doc to verify the script workflow.
  • Confirm that documentation conversion script paths can be correctly resolved.
  • Confirm that directory checking logic works correctly.
  • Current remaining errors are due to missing PyYAML dependency, which is unrelated to this path fix.

Risk

Low.

Only modified the path handling logic in the documentation build script, no runtime code or model functionality changes.

@CLAassistant

CLAassistant commented Jun 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@qiansheng91 qiansheng91 self-requested a review June 12, 2026 03:55
@qiansheng91 qiansheng91 self-assigned this Jun 12, 2026
@qiansheng91 qiansheng91 added bug Something isn't working documentation Improvements or additions to documentation labels Jun 12, 2026
The script was using incorrect relative paths after changing to the
scripts/ directory. Fixed:
- Changed initial cd from SCRIPT_DIR/../ to SCRIPT_DIR/../../ to reach project root
- Updated converter script paths from ./converters/ to ../tools/converters/
- Moved directory existence checks before cd to scripts/

Fixes alibaba#38
@handsomesix handsomesix force-pushed the fix/doc-command-error branch from 1754832 to b5eec34 Compare June 12, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants