Skip to content

If first element of build path is an empty string, builds fail with unhelpful error messages #142

@a-morphous

Description

@a-morphous

Hello, this is a problem I just debugged and solved for myself for a few hours, and thought it'd be useful to share with others:

I was trying to use the buildtool (latest master, downloaded and put into the Packages folder), but all builds were failing with '1 error' and no more specific issues. It turns out that because the version had been blank (I hadn't known you had to generate a new version), and my desired build paths began with $VERSION/, the paths being produced began with /. This overwrote the build directory when using Path.Combine here:

string buildPath = Path.Combine(BuildSettings.basicSettings.baseBuildFolder, resolvedPath);
and caused all paths to try to be written from /, which fails because Unity doesn't have access to that directory.

I think this is a case where the tool should warn or error out before even reaching the build; if a piece of the path would produce an empty string, I think it's worth noting since those issues can cause paths to behave unexpectedly like I saw.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions