Skip to content
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

Update/fix resolution of relative output path #1120

Merged
merged 3 commits into from Apr 6, 2023

Conversation

dairiki
Copy link
Contributor

@dairiki dairiki commented Mar 10, 2023

  • Update cli.py so that --output-path is interpreted relative to the current working directory.
  • Fix Project.get_output_path to resolve a relative output_path configured in the project file relative to the location of the project file (as the docs claim should happen).

Issue(s) Resolved

Fixes #1103

Related Issues / Links

Doc updates in lektor/lektor-website#367

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Link to corresponding documentation pull request for getlektor.com

@dairiki dairiki force-pushed the fix.1103-output-path branch 2 times, most recently from a5b5235 to 7e9e9cb Compare March 11, 2023 18:12
Previous was interpreting relative to the *project tree* (which is
usually, but not always, the same as the location of the project
file.)
dairiki added a commit to dairiki/lektor-website that referenced this pull request Mar 11, 2023
Note that --output-path is (now) interpreted relative to the current
working directory.
@dairiki dairiki marked this pull request as ready for review March 11, 2023 21:42
@dairiki dairiki added this to the 3.4 milestone Mar 12, 2023
@dairiki dairiki merged commit 93669d3 into lektor:master Apr 6, 2023
@dairiki dairiki deleted the fix.1103-output-path branch April 6, 2023 22:34
dairiki added a commit to dairiki/lektor that referenced this pull request Sep 11, 2023
* fix(cli): interpret --output-path relative to the current working directory

* fix(project): interpret `output_path` relative to project file

Previous was interpreting relative to the *project tree* (which is
usually, but not always, the same as the location of the project
file.)

* fix: click.Path(resolve_path=True) doesn't always work on Windows

See pallets/click#2466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent relative build paths for CLI params --output-path and --buildstate-path
1 participant