MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / fix_hermetic

Function fix_hermetic

owlbot.py:139–155  ·  view source on GitHub ↗

Fixes the formatting in the current Node.js library. It assumes that gts is already installed in a well known location on disk (node_modules/.bin).

(targets: str = ".", hide_output: bool = False)

Source from the content-addressed store, hash-verified

137
138
139def fix_hermetic(targets: str = ".", hide_output: bool = False) -> None:
140 """
141 Fixes the formatting in the current Node.js library. It assumes that gts
142 is already installed in a well known location on disk (node_modules/.bin).
143 """
144 logger.debug("Copy eslint config")
145 shell.run(
146 ["cp", "-r", f"{_TOOLS_DIRECTORY}/node_modules", "."],
147 check=True,
148 hide_output=hide_output,
149 )
150 logger.debug("Running fix...")
151 shell.run(
152 [f"{_TOOLS_DIRECTORY}/node_modules/.bin/gts", "fix", f"{targets}"],
153 check=True,
154 hide_output=hide_output,
155 )
156
157
158# Update typeless-sample-bot

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected