Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3885

cfbs build with no modules should provide helpful message instead of stack trace

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cfbs
    • Labels:
      None

      Description

       

      root@optiplex:~/cfbs# cfbs status
      Name: Example 
      Description: Example description 
      File: cfbs.json 
      
      root@optiplex:~/cfbs# cfbs build
      Modules:
      Traceback (most recent call last):
        File "/usr/local/bin/cfbs", line 10, in <module>
          sys.exit(main())
        File "/usr/local/lib/python3.7/dist-packages/cfbs/main.py", line 154, in main
          return commands.build_command()
        File "/usr/local/lib/python3.7/dist-packages/cfbs/commands.py", line 1028, in build_command
          download_dependencies(prefer_offline=True)
        File "/usr/local/lib/python3.7/dist-packages/cfbs/commands.py", line 858, in download_dependencies
          max_length = longest_module_name()
        File "/usr/local/lib/python3.7/dist-packages/cfbs/commands.py", line 833, in longest_module_name
          return max((len(m["name"]) for m in get_definition()["build"]))
      ValueError: max() arg is an empty sequence
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            craig.comstock Craig Comstock
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: