Skip to content

Commit

Permalink
The commit message for these changes could be: "Fix file ownership is…
Browse files Browse the repository at this point in the history
…sue on macOS"
  • Loading branch information
rohitpaulk committed Aug 16, 2024
1 parent 23cc234 commit eeaaec6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/models/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ export default class Course {
await exec(`git -C ${repositoryDir} add .`);
await exec(`git -C ${repositoryDir} commit -m "Initial commit"`);

// On macOS, using mount seems to automatically mark files as root:root. This doesn't happen on GitHub Actions.
if (process.env.CI) {
await exec(`sudo chown -R 0:0 ${repositoryDir}`);
}

// Test runner binary
await exec(`mkdir -p ${repositoryDir}/test-runner`);
await exec(`touch ${repositoryDir}/test-runner/test-runner`);
Expand All @@ -167,6 +162,11 @@ export default class Course {
await exec(`mkdir -p ${repositoryDir}/tester`); // Create dummy dir
}

// On macOS, using mount seems to automatically mark files as root:root. This doesn't happen on GitHub Actions.
if (process.env.CI) {
await exec(`sudo chown -R 0:0 ${repositoryDir}`);
}

return repositoryDir;
}

Expand Down

0 comments on commit eeaaec6

Please sign in to comment.