Skip to content

Document check_path_length to default to False #1036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONSTRUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ Only applies if `register_python` is true.

Check the length of the path where the distribution is installed to ensure nodejs
can be installed. Raise a message to request shorter paths (less than 46 character)
or enable long paths on windows > 10 (require admin right). Default is True. (Windows only).
or enable long paths on windows > 10 (require admin right). Default is False. (Windows only).

### `check_path_spaces`

Expand Down
4 changes: 2 additions & 2 deletions constructor/_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,11 @@ class ConstructorConfiguration(BaseModel):

Only applies if `register_python` is true.
"""
check_path_length: bool | None = None
check_path_length: bool = False
"""
Check the length of the path where the distribution is installed to ensure nodejs
can be installed. Raise a message to request shorter paths (less than 46 character)
or enable long paths on windows > 10 (require admin right). Default is True. (Windows only).
or enable long paths on windows > 10 (require admin right). Default is False. (Windows only).
"""
check_path_spaces: bool = True
"""
Expand Down
15 changes: 4 additions & 11 deletions constructor/data/construct.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,17 +456,10 @@
"type": "array"
},
"check_path_length": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Check the length of the path where the distribution is installed to ensure nodejs can be installed. Raise a message to request shorter paths (less than 46 character) or enable long paths on windows > 10 (require admin right). Default is True. (Windows only).",
"title": "Check Path Length"
"default": false,
"description": "Check the length of the path where the distribution is installed to ensure nodejs can be installed. Raise a message to request shorter paths (less than 46 character) or enable long paths on windows > 10 (require admin right). Default is False. (Windows only).",
"title": "Check Path Length",
"type": "boolean"
},
"check_path_spaces": {
"default": true,
Expand Down
2 changes: 1 addition & 1 deletion constructor/winexe.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def make_nsi(
variables["initialize_by_default"] = info.get("initialize_by_default", None)
variables["register_python"] = info.get("register_python", True)
variables["register_python_default"] = info.get("register_python_default", None)
variables["check_path_length"] = info.get("check_path_length", None)
variables["check_path_length"] = info.get("check_path_length", False)
variables["check_path_spaces"] = info.get("check_path_spaces", True)
variables["keep_pkgs"] = info.get("keep_pkgs") or False
variables["pre_install_exists"] = bool(info.get("pre_install"))
Expand Down
2 changes: 1 addition & 1 deletion docs/source/construct-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ Only applies if `register_python` is true.

Check the length of the path where the distribution is installed to ensure nodejs
can be installed. Raise a message to request shorter paths (less than 46 character)
or enable long paths on windows > 10 (require admin right). Default is True. (Windows only).
or enable long paths on windows > 10 (require admin right). Default is False. (Windows only).

### `check_path_spaces`

Expand Down
20 changes: 20 additions & 0 deletions news/1036-check-path-length-docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Enhancements

* <news item>

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* Document that `check_path_length` defaults to `False` in line with prior behavior and declare
it as `bool` only in the schema. (#1036)

### Other

* <news item>
Loading