Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Child directories not created when using Ensure Package



  • Hi,

    My environment is:

    • Otter
    • ProGet
    • A target server

    I'm trying to deploy a ProGet package to the target server. This is sort of working, but I'm having issues with the directory structure.

    My ProGet package looks something like:
    <Package Root>
    .\web.config
    .\bin\SomeDLL.dll
    .\Contents\SomeJavaScriptFile.js

    Anything in the root of the ProGet package is created correctly, e.g. the web.config file. However, the job is failing when it gets to the items in sub directories - the sub directory isn't created and so the files don't get extracted.

    If I add in "Ensure Directory" steps for the sub directories, it works - the directories are created and the files are unpacked. So I don't think it's a permission / access problem or similar.

    The packages I'm attempting to deploy are quite big and I don't want to have to create "Ensure Directory" steps for each directory in them - there's hundreds of them.

    The logs I get from Otter aren't much help - it's just "Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path.
    ".

    I'm new to Otter / ProGet / UPack, but can't see anything in the documentation relating to this.

    Any help appreciated!

    Thanks,

    Andrew

    Product: Otter
    Version: 1.7.2


  • inedo-engineer

    Hello Andrew,

    I can't reproduce this locally. How are you creating the upack archive? Could you send me an example of a upack file that exhibits this behavior?

    My guess is that the upack file has backslash path separators and that is confusing the InedoCore extension somehow.


  • inedo-engineer

    My initial guess was wrong. The problem was that Ensure-Package assumed all directories would be explicitly listed in the archive. I've filed the issue as https://github.com/Inedo/inedox-inedocore/issues/45 and submitted a fix for my co-workers to review.

    As a workaround until this fix is released, the upack command can create a upack archive in the format that it expects.



  • Thanks Ben!

    You mentioned...
    "As a workaround until this fix is released, the upack command can create a upack archive in the format that it expects"

    I've taken a look through the documentation (and source code...) for the upack command, and I'm afraid I can't see a way to use it that will result in the issue not occurring - as far as I can tell, the native C# commands to create / read zip files are being used, and there doesn't seem to be any scope in there for including directory information - it's just file information?

    Have I missed something? If I need to wait for the next release, that's not a major problem, but if there is anything I can do to get up and running now, that would be great...

    Thanks again, appreciate the help and time!

    Andrew



  • The latest InedoCore extension (v1.7.1) from the Admin > Extensions page should contain this fix.



  • That works - awesome - thank you so much!



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation