Skip to content

clone step fails on self hosted runners #59

@jgstew

Description

@jgstew

The following step fails on self hosted runners in subsequent runs:

gh-actions-lua/main.js

Lines 101 to 103 in 8aace34

await exec.exec(`git clone --branch ${repo.branch} --single-branch ${repo.url}`, undefined, {
cwd: buildPath
})

Gives the following error message:

Notice: gh-actions-lua: No cache available, clean build
/usr/bin/git clone --branch v2.1 --single-branch https://github.com/luajit/luajit.git
fatal: destination path 'luajit' already exists and is not an empty directory.

This happens when the repo was already cloned in a previous run and is still in the runner temp directory.

It seems like the folder given by the following should be deleted if it exists just before the GIT clone step:

path.join(process.env["RUNNER_TEMP"], BUILD_PREFIX, baseDir)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions