nodejs / gyp-next

A fork of the GYP build system for use in the Node.js projects
BSD 3-Clause "New" or "Revised" License
130 stars 73 forks source link

fix: error format requires a mapping #215

Closed lpcalisi closed 4 months ago

lpcalisi commented 11 months ago

Fix:

run gyp without arguments doesn't show right usage

c108df569f5e:/work# gyp
Traceback (most recent call last):
  File "/usr/bin/gyp", line 8, in <module>
    sys.exit(script_main())
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gyp/__init__.py", line 688, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gyp/__init__.py", line 680, in main
    return gyp_main(args)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gyp/__init__.py", line 553, in gyp_main
    raise GypError((usage + "\n\n%s: error: no build_file") % (my_name, my_name))
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
TypeError: format requires a mapping
c108df569f5e:/work#
cclauss commented 11 months ago

Please add a test that proves that we have a problem today and that the proposed solution fixes that problem. Please feel free to use f-strings for speed.

cclauss commented 5 months ago

Wrong repo: pipx run gyp-next, not gyp!

That currently generates a different error that should be fixed by