Skip to content

[BUG] Build failure due to old target_path approach #23

Description

@ByteOtter

Affected Module

CI/CD

Bug Description

Netlify fails to build the docs due to the old deprecated target_path variable in repo-config.yml still being required in the python scripts.

10:45:44 AM: Transforming docs for: builder
10:45:44 AM: Traceback (most recent call last):
10:45:44 AM:   File "/opt/build/repo/scripts/transform_content.py", line 750, in <module>
10:45:44 AM:     main()
10:45:44 AM:     ~~~~^^
10:45:44 AM:   File "/opt/build/repo/scripts/transform_content.py", line 744, in main
10:45:44 AM:     transform_repo_docs(repo, args.docs_dir, args.temp_dir)
10:45:44 AM:     ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:45:44 AM:   File "/opt/build/repo/scripts/transform_content.py", line 705, in transform_repo_docs
10:45:44 AM:     target_dir = os.path.join(docs_dir, repo_config["target_path"])
10:45:44 AM:                                         ~~~~~~~~~~~^^^^^^^^^^^^^^^
10:45:44 AM: KeyError: 'target_path'
10:45:44 AM: Error: Transformation failed
10:45:44 AM: Cleaning up temporary files...
10:45:44 AM: make: *** [Makefile:81: aggregate] Error 1
10:45:44 AM: ​
10:45:44 AM: "build.command" failed                                        
10:45:44 AM: ────────────────────────────────────────────────────────────────
10:45:44 AM: ​
10:45:44 AM:   Error message
10:45:44 AM:   Command failed with exit code 2: make build (https://ntl.fyi/exit-code-2)
10:45:44 AM: ​
10:45:44 AM:   Error location
10:45:44 AM:   In Build command from Netlify app:
10:45:44 AM:   make build
10:45:44 AM: ​
10:45:44 AM:   Resolved config
10:45:44 AM:   build:
10:45:44 AM:     command: make build
10:45:44 AM:     commandOrigin: ui
10:45:44 AM:     environment:
10:45:44 AM:       - REVIEW_ID
10:45:44 AM:     publish: /opt/build/repo/docs/.vitepress/dist
10:45:44 AM:     publishOrigin: ui
10:45:44 AM: Build failed due to a user error: Build script returned non-zero exit code: 2

This was accidentially introduced by #16

Expected Behaviour

No response

Steps to Reproduce

Attempt to rebuild the docs > See error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions