Skip to content

Commit

Permalink
remove --no-lint from next build
Browse files Browse the repository at this point in the history
Apparently, it causes errors. Which is stupid.
  • Loading branch information
thatmattlove committed Apr 2, 2024
1 parent 9d1c6a5 commit be09dbc
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions hyperglass/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,30 +71,23 @@ async def node_initial(timeout: int = 180, dev_mode: bool = False) -> str:
if env_timeout is not None and env_timeout > timeout:
timeout = env_timeout

all_messages = ()

try:
proc = await asyncio.create_subprocess_shell(
cmd="pnpm install",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
cwd=ui_path,
)

stdout, stderr = await asyncio.wait_for(proc.communicate(), timeout=timeout)
messages = stdout.decode("utf-8").strip()
errors = stderr.decode("utf-8").strip()
proc = await asyncio.create_subprocess_shell(
cmd="pnpm install",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
cwd=ui_path,
)

if proc.returncode != 0:
raise RuntimeError(f"\nMessages:\n{messages}\nErrors:\n{errors}")
stdout, stderr = await asyncio.wait_for(proc.communicate(), timeout=timeout)
messages = stdout.decode("utf-8").strip()
errors = stderr.decode("utf-8").strip()

await proc.wait()
all_messages += (messages,)
if proc.returncode != 0:
raise RuntimeError(f"\nMessages:\n{messages}\nErrors:\n{errors}")

except Exception as err:
raise RuntimeError(str(err)) from err
await proc.wait()

return "\n".join(all_messages)
return "\n".join(messages)


async def build_ui(app_path: Path):
Expand All @@ -110,7 +103,7 @@ async def build_ui(app_path: Path):
build_dir = app_path / "static" / "ui"
out_dir = ui_dir / "out"

build_command = "node_modules/.bin/next build --no-lint"
build_command = "node_modules/.bin/next build"

all_messages = []
try:
Expand Down

0 comments on commit be09dbc

Please sign in to comment.