def resolve_workdir_path(cls, start_path=os.curdir):
        """
        Look for an existing workdir in the given path, in a path/.lago dir,
        or in a .lago dir under any of it's parent directories

        Args:
            start_path (str): path to start the search from, if None passed, it
                will use the current dir

        Returns:
            str: path to the found prefix

        Raises:
            LagoUserException: if no prefix was found
        """
        if start_path == 'auto':
            start_path = os.curdir

        cur_path = start_path

        LOGGER.debug(
            'Checking if %s is a workdir',
            os.path.abspath(cur_path),
        )
        if cls.is_workdir(cur_path):
            return os.path.abspath(cur_path)

        # now search for a .lago directory that's a workdir on any parent dir
        cur_path = os.path.join(start_path, '.lago')
        while not cls.is_workdir(cur_path):
            LOGGER.debug('%s is not a workdir', cur_path)
            cur_path = os.path.normpath(
                os.path.join(cur_path, '..', '..', '.lago')
            )
            LOGGER.debug('Checking %s for a workdir', cur_path)
            if os.path.realpath(os.path.join(cur_path, '..')) == '/':
                # no workdir found - look workdirs up the current path + 1,
                # print informative message and exit.
                candidates = []
                for path in os.listdir(os.curdir):
                    if os.path.isdir(path):
                        dirs = os.listdir(path)
                        if 'current' in dirs:
                            candidates.append(
                                os.path.abspath(os.path.join(os.curdir, path))
                            )
                        elif '.lago' in dirs:
                            candidates.append(
                                os.path.abspath(
                                    os.path.join(os.curdir, path, '.lago')
                                )
                            )
                candidates = filter(Workdir.is_possible_workdir, candidates)
                for idx in range(len(candidates)):
                    if os.path.split(candidates[idx])[1] == '.lago':
                        candidates[idx] = os.path.dirname(candidates[idx])

                msg = 'Unable to find workdir in {0}'.format(
                    os.path.abspath(start_path)
                )
                if candidates:
                    msg += '\nFound possible workdirs in: {0}'.format(
                        ', '.join(candidates)
                    )
                raise LagoUserException(msg)

        return os.path.abspath(cur_path)
Look for an existing workdir in the given path, in a path/.lago dir,
        or in a .lago dir under any of it's parent directories

        Args:
            start_path (str): path to start the search from, if None passed, it
                will use the current dir

        Returns:
            str: path to the found prefix

        Raises:
            LagoUserException: if no prefix was found