fix: Only run npm when building from source#758
Merged
BeyondEvil merged 1 commit intopytest-dev:masterfrom Nov 3, 2023
Merged
Conversation
scripts/npm.py
Outdated
| subprocess.check_output("npm ci", shell=True) | ||
| subprocess.check_output("npm run build", shell=True) | ||
| app_js = Path(self.root, "src", "pytest_html", "resources", "app.js") | ||
| if not app_js.exists(): |
Member
There was a problem hiding this comment.
wouldn't this check also trigger after having it build once?
please check if the git folder exists first
always bui when the git folder isthere, and if its missing, perhaps print a warning and only build if the target file is missing
additionally instead of check_output, running it with subrocess.run(...,capture_output=True, check=True)
might provide better output
Contributor
Author
There was a problem hiding this comment.
Updated @RonnyPfannschmidt
Is that what you suggested?
Contributor
Author
There was a problem hiding this comment.
hmm... run is giving me issues...
Member
There was a problem hiding this comment.
Whops, missing shell=True
30334d6 to
6fdf1ec
Compare
6fdf1ec to
d219e5f
Compare
RonnyPfannschmidt
approved these changes
Nov 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #747