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

cfbs error when adding a module by zip URL - Directory not empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Higher
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: N/A
    • Component/s: cfbs
    • Labels:
      None

      Description

      I think this one happens when you add the master.zip, then change master branch in github, and add the same master.zip again (but now it's a different commit).

      $ cfbs add https://github.com/cfengine/module-template/archive/refs/heads/master.zip
      Traceback (most recent call last):
        File "/usr/local/bin/cfbs", line 8, in <module>
          sys.exit(main())
        File "/usr/local/lib/python3.9/site-packages/cfbs/main.py", line 132, in main
          return commands.add_command(
        File "/usr/local/lib/python3.9/site-packages/cfbs/commands.py", line 552, in add_command
          return _add_using_url(
        File "/usr/local/lib/python3.9/site-packages/cfbs/commands.py", line 508, in _add_using_url
          config_path, url_commit = _fetch_archive(url, checksum)
        File "/usr/local/lib/python3.9/site-packages/cfbs/commands.py", line 381, in _fetch_archive
          os.rmdir(content_root_items[0])
      OSError: [Errno 66] Directory not empty: '/Users/olehermanse/.cfengine/cfbs/downloads/github.com/cfengine/module-template/archive/refs/heads/7c1a1bc0b5816b5a8deb196879a4676ff001bd64/module-template-master'
      

      Workaround: Delete the folder in the error message and it works.

        Attachments

          Activity

            People

            Assignee:
            olehermanse Ole Herman Schumacher Elgesem
            Reporter:
            olehermanse Ole Herman Schumacher Elgesem
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: