MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / maybe_quote

Function maybe_quote

tools/shared.py:552–556  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

550 """Emulate the '-v/-###' flags of clang/gcc by printing the sub-commands that we run."""
551
552 def maybe_quote(arg):
553 if all(c.isalnum() or c in './-_' for c in arg):
554 return arg
555 else:
556 return f'"{arg}"'
557
558 if SKIP_SUBPROCS:
559 print(' ' + ' '.join([maybe_quote(a) for a in cmd]), file=sys.stderr)

Callers 1

print_compiler_stageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected