Skip to content

Commit

Permalink
Changed [build images]
Browse files Browse the repository at this point in the history
  • Loading branch information
Electroid committed Nov 13, 2024
1 parent df49a36 commit 296c4ea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/machine.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { inspect, parseArgs } from "node:util";
import {
$,
getArch,
getRepository,
getSecret,
isCI,
isMacOS,
Expand Down Expand Up @@ -937,7 +938,8 @@ function parseOptions(args) {

async function main() {
const { command, buildkiteToken, ...options } = parseOptions(process.argv.slice(2));
const authorizedKeys = getAuthorizedKeys();
const owner = getRepository()?.split("/")?.[0];
const authorizedKeys = isCI && owner ? await getGithubAuthorizedKeys(owner) : getAuthorizedKeys();

let cloud;
if (options["cloud"] === "docker") {
Expand Down Expand Up @@ -990,8 +992,10 @@ async function main() {
await doBootstrap();
await doAgent();
} catch (error) {
console.error(error);
if (!isCI) {
if (isCI) {
throw error;
} else {
console.error(error);
try {
await machine.attach();
} catch (error) {
Expand Down

0 comments on commit 296c4ea

Please sign in to comment.